Building a database driven web app
Need开发者_如何转开发 some pointers in choosing the technologies for building a database driven web app. (preferably open source)
Here are the options.
Database: MySQL. Any other option?
Platform: Java
Technology: JavaServer Faces JSF? EJB? Servlets? This is where m totally confused as in what do I choose. I want to have a web designed architecture so am having a framework (like Spring). Also I need it to be scalable! What is the best choice of frameworks and technologies in Java?
Server: tomcat? or Jetty what else? Jetty is the in thing as I see but how good is it on the windows platform?
Clientside: GWT eliminates the hassle of Javascript but is it a stable option? Are there any other options? Have used JQuery.. its good!
Database Communication: plain old JDBC? Hibernate? Mybatis? - previously known as Apache Project ibatis. MyBatis seems to be better as far as user input goes but any first hand users?
Too many questions! Please bear with me! Need your help!
Thanks!
I'm thinking this is a learning project and correct me if I'm wrong - not trying to be mean here or anything.
Based on that I'd go by the 'kiss' rule (keep it simple smarty ;-) Start out with Servlets, JSP and JDBC. This will give you an idea of what different frameworks are trying to solve. There is no silver bullets, what's best for you will be determined by the context of your problem. MongoDB might indeed be better for you than PostgreSql and it might make more sense to use MyBatis than Hibernate, etc. Imho, this will eliminate a lot of confusion. Netbeans gives you a pretty good ready to go stack with choice of Tomcat 6 or Glasfish for servers. Look into upcoming Tomcat 7 and improvements it will bring to the table.
Other options:
Database: I'd like to point out MongoDB. Every time I suggest using it, I get beaten up by SQL-people. But from my personal experience, it proved signifficantly easier going with document-oriented stores.
Platform: Well is Java just an option? Or are you sure you want to take it? There are many languages out there, each of which has its own advantages. There are two reasons, why you should pick a specific language. 1. the language is good for the job, or 2. you are really good using the language. Personally, I am an advocate of Haxe, which is why I just had to mention it :)
Technology: When it comes to Java, I cannot be of much help. But from what I understand, there are a lot of really great frameworks/solutions around. To my understanding, Struts really is worth looking at. Also, I rememeber I once stumbled upon an all in one solution, that employed GWT in the frontend. Some short, slightly russian-sounding 2-sillable name starting with "v" (if that's any help^^). So far, it was the most impressive I saw, but I forgot its name. :(
Basically, you should rather choose a framework that seems fit for your job, and then employ whatever technology it runs on.Server: Again, for Java, your call.
Clientside: GWT is stable. Talking JavaScript, you can go with qooxdoo and sproutcore. Both are aimed at creating RIAs. Other than that, Prototype, jQuery, Ext and MooTools. In contrast to the former two, their role is rather to facilitate common tasks in making HTML pages interactive, than creating persistent JavaScript-apps.
Database Communication: That really depends on the datastore and platform you use. Usually a framework makes this decision for you. Unless you're really planning to do some heavy datamining, you should rather use the abstraction layer any popular framework provides, than to DIY. The code is mature, robust and tested, removing one possible source of errors and security issues.
精彩评论