Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I'm in the conceptual stages of a project which is intended to be distributed to several platforms (Windows and Linux/Mac primarily). Through reading through the literature I have opted for an MVC architecture, with the model being a C++ library and the view/controller being coded platform-specifically.

Technically, though, how would you accomplish the model part, given that it has to be coded in as portable a state as possible? I've contemplated dynamic libraries (partly due to the modularity, partly due to the fact that it's (for me at least) sort of an obvious choice for use with other languages), however the differing interfaces for exporting symbols under each platform means that the code in itself is not really portable any longer. Any pointers as to how you guys would design this? Any standards as far as portable libraries goes?

Please be gentle :) Thanks.
Posted
Comments
CHill60 24-Nov-13 14:23pm    
Wrong forum for a question like this ... try one of the others under the Community link above. Not really able to answer this "quickly" :-)

Well, As you have already considered, there is no way(at least now) to create a light weighted cross platform MVC lib. To some extent, M and C are possible. but View from my point of view, one need to write the abstraction layer to adapt to different platform.
moreover, MVC is certainly not the design pattern, it's architecture pattern. from the definition point of view, portable seems irrelevant. However, MVC itself is simple, observer design pattern is enough. one need to consider the further implementation rather than the pattern itself.
feel interested,you may have a look "Pure MVC" one opensource project.seems having different language binding. the facade class is quite interesting.
 
Share this answer
 
v2
You might want to internet-search for platform independent GUI frameworks. QT (link to wikipedia)[^] is such a framework which may or may not conform to your requirements.

Note that the concept of DLLs is not about portabilty at all, it's about scalability and managing resources! Moreover this concept isn't even supported on many or even most non-Windows platforms.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900