Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > MVC - Language and Solution comparison Their must be a simpler way?

MVC - Language and Solution comparison Their must be a simpler way?
Thread Tools
depolitic
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 18, 2004, 07:28 PM
 
I have built a simple model 1 web-site using JSTL, no scriptlets nothing but JSTL - I have used a basic MVC design, with specific pages for each aspect of the MVC.

Now it works and I can add remove and edit my MySQL database with ease. However I still have allot of logic and controll code in my .jsp pages.

Now every one tells me that I need to move to a model 2 MVC - because it is the done thing and that is how REAL programmers do it - Even when I am just a graphic web front end hacker - and I can see the logic behind this view, with the whole separation of function philosophy.

However - maybe I am stupid - which I am not - but J2EE is a F-up mess - I have O'Reily's book on Java Server Pages and their Servlet Book. Now the JSTL stuff I am cool with however even when Bergesten tries to build even the simplistic of three page web application using a Model 2 architecture he ends up employing JSP, and Servlets, and Listeners, and Filters, and Beans, and XML, and the Struts controllers serlvets for a simple 3 page site. I makes me wonder if this supposed fantastic Java J2EE system is really that good.

He has these illustrations to show how it all relates however all it show how much of a mess it all is. Lines going every going around and around.

Bergesten has two XML files with a dozen entries, 5 serlvets for SQL abstraction 6 more servlets for the Application and a about a Dozen more utility beans and servlets and the struts framework servlets to boot. TO DRIVE A 3 PAGE SITE - People ????????

Now O'Reily's book on Java Server Pages book is supposed to teach you the basic - if this is the basics boys and girls then I think something is wrong with this cup of coffee.

Now does not all this seem rather Bizarre that MVC or is it SUN in its aim to make things easier has created this bloated mess of technology.

An old Chinese saying that I love goes like this - says - "Any solution that needs a genius to figure out is not much of a solution" - Where does this leave Java and the web.

Now essentially I have a small site, login.jsp + viewBlogEntries.jsp, createBlogEntry,jsp, and an editBlogEntry.jsp and a MySQL DB.

Is their a simpler way - to build a modular site with JSP, Servlets and possible Beans?

I am not building an online bank just a private blogging system for personal use. - I thought it would be fun to try. God did I get that one wrong.

Now this is only the tip of the iceberg, I am also aware of a dozen supposed "Leading Edge" "The best of the best" J2EE solutions out their both from SUN, Apple, Jakarta, and a Dozen other companies. Each with their own frameworks, logic, and solutions. - All claiming to be the "Way" to J2EE nirvana, it however all smells fishy. and All having their devoted fans.

All I want is to build a site, nothing more - why is this supposed wonderful solution so complex?

Now, I am going to get those PHP folks who tell me, that they have seen the light, and so should I- firstly I am on this path, I would like to finish it, before my brain tumours explodes - call me stubborn. Secondly I fear that PHP would not be much less complex once you start getting into MVC. Thirdly - I did the whole PHP thing, and Java is much preferred language.

Having said all that - if anyone has a true object orientated language with good developer support and support for Mac OS X with the power of Java - i.e. Ruby, Python, or yes PHP 5 (last time I used PHP it was just at version 3) or other - please I would love to hear from you.

Because I am getting very disillusioned with the whole lets show the world how smart we are by building stupendously complex systems called J2EE that only rocket scientists could ever hope to grasp, thus making us looking so much geeker before all those mere mortal.

HELP ? ? ? ? - There must be an easer way then what Bergsten has set forth.

I have also looking around and things are not looking good -

Had a look at Ruby and while it looks like a nice language for the web it is driven all by eruby or mod_ruby modules for Apache, I am in OZ their are no hosting companies for such a solution. Plus it looks much like scriptlets to be honest, - Their is some buzz about a MVC framework for ruby called rubyonrails however their site is down? - Lots of rave reviews however can be found.

It seems I am not the only one not happy with the official J2EE complexity, someone suggested that that is why their are so many competing solutions all trying to GET AWAY from SUN J2EE for Java.

I am looking next into Python - their is ZOPE, it looks HUGE -
I am looking to build my own site Zope is abit beyond my demands. Python also works via a CGI bin wich I am not a fan of I can still rember alll those perl scrips from years ago all coming from the CGI bin. Their are container for Python but no hosting support for them.

I still have to look at PHP 5 which seems to have just come out and looks like it going to be a Java clone, total OOP focus, but still looks like lots of logic in view pages. The common opinion I am feeling from the web is that PHP is a great RAD tool for quick fast hack sites but is not so well equipped to deal with maintenance issues over time. Plus its just ugly looking language.
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 18, 2004, 10:46 PM
 
Ruby is looking way more interesting at this time - I just cannot say no to that Japanese cool.

Anyway - yes Rails is back up and from what I have seen it shits - and let me say again SHITS over everything I have seen from the Java Frameworks, no XML files, not descriptors, all Ruby, not a dozen technologies hacked together. I will have a play with it today and get back.

My only concern is hosting - however it says that it tuns in Fast CGI which should work for me, no need for mod_ruby or eRuby.

A CGI now that is a world I thought I would not be seeing ever again, but he.

You look at the movie at Rail.org way interesting.
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 19, 2004, 02:42 AM
 
that makes sense - I wish that the oreilly book could put it that way. If you told me that yesterday before my little spat, then I would have happily and to my ow detriment have gone down the JSP, Servlet, Bean Path.

However I have worked my way thought the Ruby on Rail movie

http://www.cframe.org/files/rails_setup.mov

and let me say Ohh my mother f-ing good.

I wrote - read this this much code :

scaffold : post

YES - that is it all the code I wrote a total of two words. And what did I get for all my efforts. I complete MVC design - Rail built the database abstractions for me - generated the HTML form for the data entry, a lists page to view a list of entries, an edit the list form to edit entries and a delete button to delete unwanted entries.

Oh I also had to go to the enormous task of adding the variables for the database in a single plain text configuration file.

This is what is in it -

production: << Database Type
adapter: mysql << Database type
database: scuttlebug_production << Database Name
host: localhost << obvious
username: root << obvious
password: password << obvious

I did in 2 minutes what it took me a day in JSTL using only a model 1 design - In 2 minutes I have a complete type 2 MVC design.

Their is no way that Java can match that? I doubt you could find a faster and simpler way.

Now you would say that will only work for small sites but look at this -

http://www.basecamphq.com/

Built by one guy in a month - http://www.loudthinking.com/about.html

Just have a look at the Video and try it out?

Now to be fair to Java is not Java's faults J2EE has become a mammoth its all the comities that design J2EE all putting their 20 pounds of lead in Java boots.

Ruby - may not be static typed, and may not be English or made by white men, but f#&k if this is what it can do driven by a handful of enthusiasts - Java, PHP, or .NET really has no excuse for being as bad as it is.

Sorry to sound like the converted but I have had an epiphany.
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 19, 2004, 02:48 AM
 
Ohh I forgot to mention - no compiling, no classpaths, dynacim loading, thanks to ruby.


Add a column in an SLQ table - and the whole site reflects that change - all you do is reload the page, and the form for that table appears in order that you placed it in the sql table. Move the location of the SQL table row, and the web form dynamically reloads move the form to reflect that change.
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Oct 19, 2004, 03:40 AM
 
Wow.

Took a couple of attempts on google to find the link so.....

http://www.ruby-lang.org/en/
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 19, 2004, 11:00 AM
 
skalie - wow what?

Wow ruby, wow rail or wow hard to find
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Oct 19, 2004, 11:52 AM
 
...er, wow from what I saw in the rail / ruby movie.

That's just the sort of stuff (cms) that I've been spending years getting under the belt with php (4.3). I'm just about to put togther the back end to a rather large site, with a cms using php to edit xml and also a forum, well, all the stuff you'd expect from postnuke or aome other open-source jobbie, but homemade. Seeing the way ruby just pounced on an extra table in a MySql database and threw in the back-end data manipulation was just stunning.

Almost, almost, tempted to delve into it, but it would mean going into uncharted waters, alone, yet again, and my innovation to actual work ratio is already a little on the uneven side.

Maybe as a hobby.

........and also wow, hard to find for something that's been developed since 2000 ???, FAQ's not working on the site I linked, rail.org down as well ??? Maybe the English side of things isn't quite up to the minute ???
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 19, 2004, 12:53 PM
 
the link is rubyonrail.org and it works.

Look at theses links I have collected since yesterday:

http://poignantguide.net/ruby/index.html
http://www.rubygarden.org/
http://www.ruby-lang.org/en/
http://pine.fm/LearnToProgram/
http://www.ruby-forum.org/bb/
http://rubyforge.org/
http://raa.ruby-lang.org/
http://rubyonrails.org/show/HomePage

I am glat see that I am not the only one impressed by Ruby and Rail.

Also look at basecamp build only two months ago. Yes Ruby is the only language ever to be invented by a non English speaking non roman numeral using creator - i.e. Japanese - their is a huge mass of Japanese stuff but it need to be translated.
( Last edited by depolitic; Oct 19, 2004 at 12:59 PM. )
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Oct 19, 2004, 08:29 PM
 
Yeah, it looks like a nice development environment.

I'd be interested to hear how it performs real-world tests (speed vs stability) against JSP, PHP and ASP. Given that you can run it as a FCGI I image you'd get some good scores, but I'd like to see the evidence.

The other major drawback (and this is more of a problem with languages in general than Ruby itself) is that there is most likely a scarce resource available to support it. So if I built a business application with it and I fall off the perch, who else could maintain and develop the app?

I don't see hosting as an issue, as you could quite easily get a colo box with Linux and run it yerself...

I do agreee that JSP looks intimidating, and that's why I haven't dived into it yet. Guess I need to know for the sake of being aware, but I don't know how committed I could be to it given the steep learning curve.

BTW, why did they develop the basecamp site in PHP and the app in Ruby? Interested to know, not poking fun.
Computer thez nohhh...
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 20, 2004, 01:01 AM
 
The question has been asked about the availability of Ruby programers, while not as many as Java, PHP, their is a very strong and very loyal group of Ruby developers. Who tend to program Ruby for love not money and have more of a passion for it, then just doing it for the pay.

I have been told that if you placed an add for a Ruby programmer you will be surprised how many replies you will get.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:55 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,