Re: Which do I use for web design?
- From: Arved Sandstrom <asandstromtwo@xxxxxxxxxxx>
- Date: Tue, 10 Jun 2008 14:43:52 GMT
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
.
- Follow-Ups:
- Re: Which do I use for web design?
- From: Lew
- Re: Which do I use for web design?
- References:
- Which do I use for web design?
- From: jmDesktop
- Re: Which do I use for web design?
- From: Roedy Green
- Re: Which do I use for web design?
- From: Arne Vajhøj
- Re: Which do I use for web design?
- From: Roedy Green
- Re: Which do I use for web design?
- From: Arne Vajhøj
- Re: Which do I use for web design?
- From: Lew
- Re: Which do I use for web design?
- From: Arved Sandstrom
- Re: Which do I use for web design?
- From: jmDesktop
- Which do I use for web design?
- Prev by Date: Sending mail with Java
- Next by Date: Re: How to supply a Database enabled Application?
- Previous by thread: Re: Which do I use for web design?
- Next by thread: Re: Which do I use for web design?
- Index(es):
Relevant Pages
|