I completely agree with your point.of view. A lot of medium and small projects have not very many business process to be implemented. A lot of emphasises are placed on presentation tier or we say "GUI". Besides this, i think general CRUD also takes us tremendious energy and a lot of time. In my opinion, I haven't seen any elegant, efficient, stable solution that solves these problems. Whether pattern such as MVC, new technology such as Ruby, or some thing else.... As to me, I have take a lot of time on research of these articles. And I consider that there might be two way that could be resolve these problems. 1. Technology. Smart client. Combining with advantages of B/S and C/S enable your application more stable and more efficient.
2. Methodology of design Thinking of container and architecture centric are two important thinking.
Acutally, Ruby on Rails and other script language have not these two charactristics. We could use them in some aspects but not most of the aspects that we might encounter in a project. Technology of code generator is not bad. But do you expect that your projects is full of stuff that are generated by code generator that are not easy to read or not easy to maintenance.
The framework designed with thinking of container is able to provider more high level abstraction and encapsulation.
I prefer to build a mechanism that likes virtual machine. The runtime environment is based on container. Instead of code generator, we can choose various configurations describle runtime environment, define behaviors regarding what runtime environment wants to do. Configuration should be as simple as that has. For example, instead of adding Swing components to a view directly, it's better to define the position information and events of these components in a file and build a GUI container whose responsible is parsing view file and adding them to a view.
The same thing that we can do is buiding a CRUD container. Of course, we have various CRUD container now such as hibernate, JDO and so on. It can not be denied that these containers are very good, very powerful and robust. One thing we just need to do is building a simple adapt of a CRUD container that you want to use in your project in order not to expose more detail of persitence technology.
Back to the topic of code generator, i prefer use code generator when i met some problems that is hard to be handled except by using code generator. For example, a checking logic is a very complicated expression that should be change depending on runtime environment. It might take a lot effort if we don't use code generator. Maybe, Ruby is a good choice for this case.
In a word, the more reusable that you have, the more efficent that you could do.
|
|