Code Comments
Programming Forum and web based access to our favorite programming groups.So I need to track/manage news articles, users and links, quotes, etc. I
see that some people like this style, where you have one big switch
statemment:
switch($section)
{
case 'news':
# ... ... ...
break;
case 'links':
# ... ... ...
break;
case 'users':
# ... ... ...
break;
So then you can make a bunch of function calls etc. Now I can see why
you'd like this, because it's more C-like or C-oriented style.
But what about this:
/admin/news/list.php
/admin/news/edit.php
/admin/links/edit.php
/admin/links/edit.php
... but to me that seems more intuitive from a web page perspective -
any thoughts on this?
Post Follow-up to this messageThe alter of the two options is what I usually go for, mainly because of the
freedom in designing a look to the pages.
Certain products/news articles may differ in content in terms of fields to
complete. Plus the way in which we work here using dynamic editable text
instead of forms makes it easier to layout and code
hth
Craig
"asdf" <asdf@news.sf.sbcglobal.net> wrote in message
news:MPG.1ac8308ea08d88d5989680@news.sf.sbcglobal.net...
> So I need to track/manage news articles, users and links, quotes, etc. I
> see that some people like this style, where you have one big switch
> statemment:
>
> switch($section)
> {
> case 'news':
> # ... ... ...
>
> break;
> case 'links':
> # ... ... ...
>
> break;
> case 'users':
> # ... ... ...
> break;
>
> So then you can make a bunch of function calls etc. Now I can see why
> you'd like this, because it's more C-like or C-oriented style.
>
> But what about this:
> /admin/news/list.php
> /admin/news/edit.php
> /admin/links/edit.php
> /admin/links/edit.php
>
> ... but to me that seems more intuitive from a web page perspective -
> any thoughts on this?
>
>
>
>
Post Follow-up to this message
"asdf" <asdf@news.sf.sbcglobal.net> wrote in message
news:MPG.1ac8308ea08d88d5989680@news.sf.sbcglobal.net...
> So I need to track/manage news articles, users and links, quotes, etc. I
> see that some people like this style, where you have one big switch
> statemment:
>
> switch($section)
> {
> case 'news':
> # ... ... ...
>
> break;
> case 'links':
> # ... ... ...
>
> break;
> case 'users':
> # ... ... ...
> break;
>
> So then you can make a bunch of function calls etc. Now I can see why
> you'd like this, because it's more C-like or C-oriented style.
>
> But what about this:
> /admin/news/list.php
> /admin/news/edit.php
> /admin/links/edit.php
> /admin/links/edit.php
>
> ... but to me that seems more intuitive from a web page perspective -
> any thoughts on this?
>
>
>
>
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.