views:

139

answers:

4

I am investigating a switch from windows to linux and i struggle to find samples of design patterns applied in this world.

The application is a classic client server with detailed forms for each business entity.
It will be taking user input, do some validation checks, a few calculations, and save them to database.
It will also have lists summarizing entities, and searches among these entities.
A click to one item of these lists will open the detailled forms.

If i use python or ruby, what should i use for GUI ?
And what pattern : is MVC, MVVM or MVP any good ?
Or is there anything better ?

Note : I have never done web developpement, and i would like to avoid to have to learn both linux and web developpement at the same time.

+4  A: 

When you go Python, have a look at Qt (Python bindings to choose from: PyQt or PySide). Qt is a really nice / feature complete / mature cross-platform GUI library (which also does some other things).

As far as Python bindings are concerned, PyQt is GPL or commercial at the moment / PySide is LGPL (if licenses matter).

These 'patterns' you speak of (MVC, ...) can be applied cross-platform. What would be the best fit really depends on what type of application you are writing.

ChristopheD
I am writing a classic client server with detailed forms for each business entity taking user input and saving them to database, lists summarizing entities, and searches among these entities.
alfredo dobrekk
+1  A: 

The two main UI toolkits in Linux these days are Qt and GTK+. Qt is widely used by the KDE desktop, while GTK+ is widely used by Gnome. But a Qt app will run in Gnome and vise-versa. Both toolkits have bindings to a massive amount of languages.

joemoe
+2  A: 

Given how you explain your application in a comment, while fully endorsing Qt, I would also recommend you consider the many advantages that could come your way from making your application a web app.

Since you say it's a client-server app, it needs (at least) local network connectivity at least, so the first objection typically raised against web apps is nullified.

The first huge advantage is that you wouldn't be choosing one client platform vs another -- just support modern cross-platform browsers like Firefox or Google's Chrome, and your customers will be able to pick whatever client platform(s) they prefer (if you also carefully check your app on Safari, which has much rendering logic in common with Chrome via the Webkit framework, your web app will then be usable on iPad too).

The second big win is that your app won't require any "installation" on the client(s) -- it will always be ready.

Modern Javascript frameworks (such as jQuery, Dojo, Closure, ...) allow heavy interactivity if you need it, support GUI building with UI widgets &c, and incidentally take care of most cross-browser differences on your behalf. On the server side, with either Ruby or Python (or other languages yet), you can even find frameworks that smoothly integrate with the client-side Javascript resources.

Oh, and, the computational resources needed to run the application (such as RAM, CPU power, disk space, ...) are cheaper "in bulk" on a server, or small group of servers, and thus shared among those clients which are active at a given time, than spread out over many clients (including many who won't happen to be active at any givem time;-).

Really, in my opinion, there is little left today to recommend local GUI apps when you're developing anew anyway, save possibly the need to run when cut off from all connectivity (and, even there, with HTML5 and the like, browsers are making great strides towards empowering such apps).

Alex Martelli
I do not agree with this answer was going to ding -1 but did not. here are lots of reasons for using local apps vs web apps. Better UIs, Better choice of development tools than untyped Javascript, Access to local hardware and OS resources. As far as deployment there are many tools that allow deployment of local client/server apps.
Romain Hippeau
WebApps, at the moment, stand no chance to native Desktop Applications. Period. Wether it's about performance(yes JS may be fast, but at the price of 70%-100% CPU usage...), GUI toolkits(The DOM is the worst "Toolkit" that was ever written!), Desktop integration or saving huge files locally and making use of other than the HTTP(S) protocol. And when you have to rely on Flash etc. for Sockets or something, it's just not worth it. And for the "no installation required"; what if a user has a Browser which doesn't support all of the fancy HTML5 stuff? Yes he need to install Chrome or somethin ;)
Ivo Wetzel
I see points for both local and web clients, but being very low level at web developpement, AJax, HTML 5, Silverlight, would be a too big investement for me.But i really like the idea not having to update the software on clients.
alfredo dobrekk
A: 

Design (or architectural) patterns have nothing to do with the target programming language or operating system. Ook at you problem, if you can see you requirements which will be fulfilled by some solution provided by a pattern and the consequences will be good, jsut use the pattern. If you aks MVC, MVP, MVVM etc. look at those patterns and problems they solve and if it is what you need for you application, use them.

Gabriel Ščerbák