Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about code reuse
Message
From
15/12/2018 15:03:56
 
 
To
15/12/2018 14:48:52
General information
Forum:
WinDev
Category:
Class design
Miscellaneous
Thread ID:
01664505
Message ID:
01664511
Views:
41
>>One thing I wonder about Windev/Webdev, if there is a possibility to share some parts of the code between each other. For instance you would have a Windev project, and like to have some Webdev interfaces for the same database. Can you re-use some of the business code, or is this a complete separate project and no code is being shared?
>
>Firstly, the coding language, syntax, structure, etc. is the same between WinDev, WebDev, and WinDev Mobile. So you only learn 1 language. However one will obviously need to understand a few differences such as how a website/app works differently from a desktop app for example regarding state, browser executing code, and server executing code, etc. Also, not all functions available for desktop apps is available in web apps or in mobile apps not least of which because not all functions apply or have any meaning/purpose in all platforms. But the help and the IDE are very good to help guide that process.
>
>Secondly, you can create procedure files like you do in VFP containing functions and routines. These procedure files can be shared between different projects. You can create classes and these can be shared. You can create a database schema/analysis and this can be shared. So if you create code which is processing only (no interface) and build interfaces separately then you could share that code and obviously design different interfaces for desktop vs. browser.
>
>So it is not so that you develop a desktop app and it can just run in a web browser served up by IIS/Apache. That is not the case. If you want that then taking your VFP app with TSPlus is the fastest solution to get you up and running inside a browser with zero code changes. But it is a case that code such as pure logic/business rules/routine/functions/processing code/etc. can be shared, the database and database schema can be shared, and then you develop the interfaces for each target platform; desktop, browser, or mobile as required.


Thanks, that is kind of what I was hoping for in a scenario like this, because just running the same codebase would not make sense anyway. But if business and data related classes are properly encapsulated and those can be reused, this is already a big step.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform