Re: Which do I use for web design?



jmDesktop wrote:

[ SNIP my own, and some of poster's ]
If I did this type coding long enough, you'd think I'd change, but I
didn't until ASP.NET when I was actually exposed to some separation of
layers. Without the tools, however, I was back to the old. My point
is that what I now know is I either pick a framework, write my own
framework, or I am stuck with the mixture of layers.

Let's say that all you need to write are small and relatively simple web
apps. For Java, your own "framework" may simply be a re-useable controller
servlet, an event handler base class, some of the core event handlers, and
some of the core JSPs. You could also regard the JSTL as part of your
framework. If your simple web apps access databases, part of _your_
framework (in the Model part) would also be a skeleton data access object
(DAO) system (see
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html) -
this could be quite simple, potentially to the point of targeting a single
RDBMS.

IMO it's a good exercise to create a skeleton framework like this. Number
one, you can actually develop with it. Number two, it exposes you to the
concepts at the lowest level. Number three, when you start using other
frameworks, you'll know that fundamentally that that bit is replacing your
Views, that other bit is replacing your Controller, and that other stuff is
doing what your Model does.

It also doesn't hurt to tackle each new framework at a very simple level.
Choose one of the basic tutorials, and dissect it. Identify the Model, View
and Controller. Next, implement one of your own simpler applications.

You can absolutely get overwhelmed by using a high-powered IDE that has
support for various technologies. Dive into a J2EE app using Netbeans, and
in an hour or so you can have a working app that set up entity classes
mapped to a DB, it created a session facade bean for you, it created all
the stuff for a few JSF web pages, and at the end of that you're not
necessarily much the wiser about anything that's going on. IOW, and again
this is just my opinion, I wouldn't recommend starting this way.

I also understand why the frameworks were created and I admire the
folks from all the languages that wrote them. They are the ones that
really understand what's going on. I think I do too now, but am
woefully inept to even begin to create an MVC framework.

With regards to the latter, still a good article is
http://www.stardeveloper.com/articles/display.html?article=2001060501&page=1

This is an MVC2 example. Page 6 will mention the limitations of this
example: no support for forms handling or internationalization, not a
particularly complex user interface (one event, one handler), and some
scriptlet code still in JSP. Also, the state components of the model are
very simple. Because the limitations _are_ mentioned in the article you're
not left in the dark about actual real-life improvements that would be made
(that is, what frameworks will do).

Also, if you haven't already done so, read (at a minimum)
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier.html
from "Designing Enterprise Applications with J2EE". That link points to a
discussion of the web tier.

Note that with enough care you can make this work with any language. For
example, see http://www.tonymarston.net/php-mysql/infrastructure.html#mvc
It's not a bad idea to read up on MVC done in other environments - it
highlights the principles.

This should get you started.

AHS
--
* change 'two' to '2' to email me
.



Relevant Pages

  • Re: which is a better dev language
    ... C/C++ is a long ways from being dead. ... database apps and prototyping, but commercial apps should be done in C/C++. ... VB.NET is much slower using the 2.0 framework than it was on the 1.1 ... I am in the process of rewriting about 20 compact framework application. ...
    (microsoft.public.pocketpc.developer)
  • Re: Conversion Problem
    ... ...and he's not familiar with the framework because the help system sucks ... As opposed to the "feature rich " apps in VB6? ... I said that was one of the reasons for control arrays? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: some interesting perspectives on .NET from the other camp ...
    ... >> those who now write apps so heavily steeped in direct .Net calls? ... with Win32 dependencies I preach writing ... Bottom line is that you have the functions, in the core language, ... calls whatever framework or foundation function it needs. ...
    (borland.public.delphi.non-technical)
  • Re: Frameworks for "Non-Content Oriented Web Apps"
    ... >There are great Python Web Application Framework. ... >meant for content oriented web apps. ... While developing a school information system, ...
    (comp.lang.python)
  • Re: A Succinctness Challenge
    ... Marco Baringer wrote: ... > framework designed for writing your apps:). ... In my usual work I have to write such applications ...
    (comp.lang.lisp)