[Seaside] Is your code for your Seaside web-app using concise methods?

Philippe Marschall philippe.marschall at gmail.com
Wed Jan 24 10:25:13 UTC 2007


2007/1/24, Rick Flower <rickf at ca-flower.com>:
> I've been working on a web-app with Seaside/Glorp for a while now
> (although it's been on hold since November when I last worked on it) and
> find that some of my administrative classes are getting a bit larger
> than I really want.. I can certainly refactor the code to collect each
> functional-area of the admin interface into its own class, but am
> curious about whether others out there with Seaside apps have most or
> almost all of your classes with methods containing <10 lines of code
> (give or take)?   Some of my admin methods have >20-30+ lines of code --
> many of which are laying out forms or handling callbacks..  In those
> cases, I don't think there's much that can be done  -- correct?

There is. Don't do the forms yourself, instead generate them with
something like Magritte.
And as brutal as this sounds now: use proper CSS and hire a web
designer. No more inline styles, no more consecutive breaks.

Cheers
Philippe

> Right now, my admin interface deals with the following sub-areas (with a
> bit over 30 methods):
>
>   o Category maintenance
>   o Inventory maintenance
>   o Order management
>   o Vendor management
>   o a few other misc. items
>
> I'm probably going to try to refactor out each sub-area into its own
> class which will take a bit of surgery to accomplish, but it should make
> the code a bit easier to follow I think..
>
> Anyway, I guess I'm just curious if my ST coding skills are leading me
> down the wrong direction (I'm used to writing C++ code for my day-job
> where it's not uncommon to find methods with 50-100 or more lines) and I
> should be going for more simplicity in how my methods & objects are laid
> out..
>
> Comments?
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the Seaside mailing list