![]() |
question regarding GUI factory.
hey guys!
i have a question regarding cross-platform GUIs. id like to create a custom windowing API, for linux and windows using design patterns... so i would have an abstract GUI factory, from which i derive linux and windows versions for my GUI factory, but the question is, is it a good idea to use wxWidgets for both windows and linux concrete factory objects? or would i be better off using the windows API and some linux GUI toolkit? sorry if this sounds silly, i dont have much knowledge of this! thanks :D |
What's the point of adding another layer? If you already have a GUI API such as wxWidgets, and that API is already cross-platform, what's the benefit?
I agree there could be a benefit if you were writing a new API that wrapped native API functions- as I expect such toolkits do- but that benefit would mainly be that of learning. The only way I see it offering a benefit to others would be for you to incorporate features lacking in other cross-platform toolkits. Remember, each layer introduces dependencies, making the code more liable to break if changes to one layer are made. It can also become tedious to maintain, and less efficient (though this latter point is typically not an issue with user-driven interfaces). |
yeah, i guess!
|
Quote:
If a changes in a low level layer result in a need to change code in an upper level layer, then that's either a sign of excessive dependencies of the upper layer on implementation detail of the lower layer OR a sign that the lower layer wasn't complete. Higher levels of abstraction tend to involve more performance penalties, but that's usually because operations in the higher layers do things in terms of multiple lower level operations -- if that's not the case, one should ask why there are multiple layers in the first place. Well designed layered designs tend to avoid unnecessary performance penalties. |
| All times are GMT -5. The time now is 2:56 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC