The thread with no subject line...

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

The thread with no subject line...

Post by smpdawg »

Of couse the post has a subject, just couldn't think of an appropriate subject line.

Since those of us in this area seem to be more seasoned PHP programmers and like to bounce ideas around I'd like to make this proposal. How about starting threads on a periodic basis that have a (hopefully) sustained discussion about common programming problems in PHP?

We could take a subject, talk about the common issues and propose a better way of solving the problem. Then as part of the discussion, we could make a sample implementation or implementations and refine it. The code that is generated could not only spark our discussions but could also help other people on the site.

If anyone else is interested, let's take a vote on the first topic.

BTW - If someone has already suggested this, my apologies and I'll be awaiting the flames. :D
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Securing scripts against hostile user input?
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Maybe working with persistant objects? I hate having to repopulate things on every page - what a waste!
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

There are also seem to be a lot of form related problems and that encompass what you have both suggested. But I am certainly not suggesting it before the others, it would be a big problem to tackle first.

I also wonder why there are few DB grids available, especially those that allowing sorting, editing, etc. Most projects that I work on end up requiring something like that and the closest that I have gotten is just writing a class to display nice and consistent looking tables. I have thought about just using http://activewidgets.com/ with a PHP wrapper but that doesn't address all my needs either.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

What features are you looking for?

If you haven't seen this already, JPSPAN might be of interest for client side stuff.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Was that directed to me?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Sorry yes - I was wondering what your feature list for a db grid would be.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Here are some of my requirements.

Required:
Different types of databinding like CSV, XML, through an abstraction layer perhaps.
Completely CSS styled.
Sortable in both ascending and descending order.
Sort column can have a different color.
Draggable columns.
Resizable columns.
Show icons.
Can do replacements of ID fields to the pretty text. ie user_id mapped to user_name
Has to work in the major browsers.

Nice to have:
Right click context menus.
Sortable in the client without having to call back to the sever.
In place editing.
Column hiding.

Dream: :D
Collapsible rows that can show dissimilar information.

I'm sure there are more things but this is the basic stuff.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

I don't want to sidetrack this thread too much with my wish list...

So of the ideas bounced around (but not the grid) what one would we like to start with? Pick one and let's start a new thread and refine the idea and put out some code.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I believe securing scripts could be of more use to lots of people, not just us "nuts" about this stuff. However both ideas would be good to talk about at some point.

So.. +1 for securing.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Security is always a good thing. :D So if the vote continues this way, we could do security first and then persistence and they could lead into trying to building better forms.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

I just broke down and wrote an object to generate the code to drive the grid from http://www.activewidgets.com.

It has row and column objects as well as row and column lists and a grid object. It generates the JavaScript to do a rudimentary grid like the one on the front page of their site. I am going to add tooltip and image support and make some refinements and post it back here when it is stable.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

feyd wrote:I believe securing scripts could be of more use to lots of people, not just us "nuts" about this stuff. However both ideas would be good to talk about at some point.

So.. +1 for securing.
Some ideas could be borrowed from Security section of our internal Wiki, btw.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Ah yes, quite true, Weirdan.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

The grid idea does seem to be more of a js project but since it also has to interface with php domain objects, not exclusively so. I've never taken time out to learn some js so that could be interesting.

I don't want to push the decision one way or another. Maybe someone might even have other suggestions?
Post Reply