FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Dynamic form generation
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Dynamic form generation [message #177742 is a reply to message #177739] Thu, 19 April 2012 12:29 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/19/2012 4:56 AM, Tony Marston wrote:
> "Jerry Stuckle"<jstucklex(at)attglobal(dot)net> wrote in message
> news:jmmabk$67a$1(at)dont-email(dot)me...
>> On 4/18/2012 4:33 AM, Tony Marston wrote:
>>> "Jerry Stuckle" wrote in message news:jmk2lu$hgn$1(at)dont-email(dot)me...
>>>>
>>>> On 4/17/2012 8:49 AM, Thomas 'PointedEars' Lahn wrote:
>>>> > Denis McMahon wrote:
>>>> >
>>>> >> On Fri, 13 Apr 2012 09:59:52 +0100, Tony Marston wrote:
>>>> >>> If you used a proper framework ...
>>>> >>
>>>> >> ... then you'd have all the junk and baggage that comes along with
>>>> >> that
>>>> >> framework, including any security flaws in the framework.
>>>> >>
>>>> >> Not saying that frameworks are inherently bad, but they're not
>>>> >> automatically the solution either.
>>>> >
>>>> > TINSTAAFL. If you want complete flexibility of the application as the
>>>> > OP
>>>> > wants, you have to have an abstraction layer in your application,
>>>> > i.e. it
>>>> > has to be built on a framework (some people really should reflect on
>>>> > the
>>>> > term "framework" and its etymology). Abstraction layers come at a
>>>> > price:
>>>> > Increased overall complexity of the application and decreased
>>>> > efficiency for
>>>> > tasks that do not require as much flexibility.
>>>> >
>>>>
>>>> Yup, and when you use a framework you force the application to match
>>>> the framework, instead of allowing the application to meet the
>>>> client's needs.
>>>>
>>>> It may work - but then it may not, also.
>>>
>>> The client's needs are met by screens/reports which have the right
>>> layout and which perform the right functions. My framework does not
>>> stand in the way of that at all. When user transactions are initially
>>> generated they have default screens and default behaviour, but these can
>>> be customised to whatever level of sophistication you want.
>>>
>>
>> The client's needs are met by the APPLICATION. This is much more than the
>> screens and the layouts. But then if all you do are trivial database
>> applications, then I can see where something like that can help.
>
> An application is nothing more than a collection of individual components,
> where each component does a "unit of work" from the user's point of view. A
> small application has a small number of components, while a large
> application has a large number of components.
>

I can understand how someone like you who does such simple stuff things
that way. But then you've never worked on something even moderately
complex.

A large application is much more complex than just having "a large
number of components".

>> However, your example of over 200 tables and 350 relationships is a
>> perfect example of how bloated such code can become.
>
> The term "bloat" implies having things which are not used, and I can assure
> you that every database table has a purpose and is used in one or more
> transactions. If a database table ever became redundant then I would remove
> it.
>

Not at all. "Bloat" also refers to applications which are overly large
for what needs to be done.

> My databases are based on the designs in Len Silverston's Data Model
> Resource book. So far I have implemented the PARTY, PRODUCT, ORDER,
> INVENTORY, SHIPMENT, INVOICE, REQUEST and WORK-EFFORT databases. If you
> bother to read his book you wil see that every table serves a purpose.
>

Yes, that works fine for simple applications. But then you've already
said that's all you do. You've never worked on anything even moderately
complex.

>>>> > Whether that framework was written by you or someone else is another
>>>> > matter.
>>>> > Chances are that a framework written by someone else has already gained
>>>> > enough adoption in the global software community that its flaws -
>>>> > including
>>>> > security flaws - are more quickly detected and fixed than in a
>>>> > framework
>>>> > that you have written yourself. On the other hand, chances are that a
>>>> > framework you have written yourself can be better adjusted *by you*
>>>> > to do
>>>> > what you want than a framework written by someone else, especially if
>>>> > you
>>>> > created it for the same project in which you are using it.
>>>> >
>>>>
>>>> So? Good programming practices and test cases will eliminate more
>>>> security flaws than many of the "frameworks" out there. Have you seen
>>>> some of the crap code which has been written "by committee"? Not all
>>>> of it, but a lot of the donations are from people who don't really
>>>> understand what they're doing - or at least don't write code like they
>>>> know what they're doing.
>>>>
>>>> > Inevitably all frameworks become bloated if functionality for
>>>> > flexibility
>>>> > keeps being added to them. It would appear that there is a point where
>>>> > a
>>>> > framework author should stop improving it and start something new for
>>>> > a new
>>>> > project, maybe based on old code (but sometimes a rewrite is less
>>>> > expensive
>>>> > and turns out to be better). IOW, it is a good idea if you built
>>>> > frameworks
>>>> > with modularity in mind and use them only *as needed* (not simply for
>>>> > the
>>>> > sake of using them, like trying to appear cool to the crowd).
>>>> >
>>>> >
>>>> > PointedEars
>>>>
>>>> If a framework attempts to be "all things to all people", then that's
>>>> quite true. But the same is true of *any* code.
>>>>
>>>> However, a limited framework with limited goals doesn't necessarily
>>>> have to be the case.
>>>>
>>>> For instance, in my case - I have a framework which builds PHP classes
>>>> to interface to a database. It generates a lot of usable code for
>>>> those classes, including form handling.
>>>
>>> So you framework generates "a lot" of code, does it? My framework
>>> generates very small amounts of code which call shared functions or
>>> which inherit code from abstract classes.
>>>
>>
>> Yup, for instance, it generates all the set and get methods for the
>> applicable class, as well as database access code (insert/update/delete
>> for single rows and single rows and lists of multiple rows for SELECT).
>> (Most of the access code is in parent classes).
>
> My framework does not bother generating set and get methods as they are
> inefficient. Data goes in and comes out as an array.
>

Yea, that's why your code is crap. You obviously know nothing about
proper OO coding techniques. And that means in order to change one item
in the object the user has to build an array for the whole thing?
Bloat... Bloat... Bloat...

> My framework does not generate any database access code as that is already
> provided by my Data Access Object (DAO). I have one for MySQL, one for
> PostgreSQL, one for Oracle and another for SQL Server. I can switch from one
> to another simply by changing a single line in a config file.
>

Yes, you always waste a lot of time retrieving all columns, whether they
are needed or not. And you update all columns, whether you need to or
not. Bloatware.

>> It also generates the code necessary to validate a field. Some stock
>> fields (like "must be integer") have predefined validation functions.
>
> My framework does not generate any code to perform basic field validation as
> that is performed by a validation class which I wrote years ago.
>

More bloat. And tell me how your class handles a rule such as "8-16
characters, must have both upper and lower case and at least one digit".

Or how about the bloat of calling a class to verify the input is an
integer when a simple one line statement works. More bloat.

>> Others, like passwords where the rules may change, allow the validation
>> to be handled by a regex, function call or similar.
>
> In my framework any password rues - such as minimum length, the number of
> uppercase characters, the number of lowercase characters, the number of
> digits - is controlled from a database record. Each customer can therefore
> change the rules without me having to change any code.
>

More bloat. And unnecessary.

>> It also has the ability to generate forms html to display (read/write or
>> read only). And this is all one function. If I need a different layout
>> for a different page, it's easy to copy/paste a new function and redo the
>> output.
>
> Copy/Paste? That produces duplicate code, not sharable code, and even you
> should know that duplicate code violates the DRY principle.
>

You obviously don't understand the DRY principle. Just because you
copy/paste does not mean it's duplicate code. Once the code has been
modified to do something else, it is no longer duplicate.

>> It also has a function to populate the object from $_GET or $_POST values
>> (with validation).
>
> I don't need a whole function to do that when a single line will do:-
> $result = $object->insertRecord($_POST);
>

So what is insertRecord($_POST) then, if it's not a function? Once
again you show your ignorance. Don't even know what a function is!

> This means that the same line will work on any object regardless of which
> class it came from. That is what polymorphism is all about.
>

Nope, that's not at all what polymorphism is about. But you obviously
don't understand polymorphism, either.

>>>> However, since each class is pretty much independent, I can easily
>>>> change a class without affecting the rest of the program.
>>>
>>> So can I with my framework.
>>>
>>>> I don't have it where it will work with multiple tables yet (something
>>>> I will do one of these days), but it takes a huge amount of the
>>>> repetitive work off of me.
>>>
>>> Removing the need for all this repetitive coding, the "plumbing" as I
>>> call it, is exactly what my framework does.
>>>
>>
>> Not if it only generates a tiny bit of code.
>
> You are missing the point as usual. My framework need only generate a small
> amount of code as everything else, especially all the standard plumbing, is
> included from standard pre-written functions.
>

No, I'm missing nothing. But you've clearly shown just how crappy your
code is.

>>>> And no, I don't try to use it for every project. But where a project
>>>> is database-intensive, it suits my purposes.
>>>
>>> All my applications are database-intensive, which is why I use a
>>> framework which is centred around the database.
>>>
>>
>> Ah, that explains it, then. Database access is easy (although many people
>> can still screw that up). Most of my applications need to do real work.
>
> My framework takes care of all the standard database access, and getting
> data in and out of the screen, plus basic data validation. As for the "real
> work" as you call - or the "payload" as I call it - that is done by adding
> whatever code is necessary in the relevant class to implement each business
> rule. The point is that when using my framework the programmer has to spend
> little or no time on the standard plumbing, which leaves him with much more
> time to spend on the payload.
>

Yup, you've never done any applications which require real work, as you
once again have shown.

>> But I'm also not so stupid as to think that my frameworks is good for
>> everyone. It works for me. But I don't try to foist it off on someone
>> else without telling them it's my framework. That is just plain
>> dishonest.
>
> I never said that my framework is the perfect solution for everyone. If you
> a writing a simple website then it's not good, but if you are writing a
> database application then it's better than most.
>

Hmmm, you sure seemed to indicate that when you first started pushing
this piece of horse hockey.

> I was never dishonest about the Radicore framework. I never said it was
> written by someone else. I even include a link to the radicore website in my
> signature.
>

And you never said it was written by you, and that you were nowhere near
an unbiased user. The fact you are pushing your own product without
telling people you have a vested interest is dishonest. The fact you
have a link to it in your sig is immaterial - lots of people have links
in their sigs to all kinds of things.

But then I can see why you don't want to tell people it's your product.
I wouldn't want to admit to having created that piece of horse hockey,
either.

> If *your* framework is so good, then why don't you release it as open source
> so that we call all have a laugh?
>

For a lot of reasons. Mainly because I'm not interested in the hassles
of having to support it for a bunch of people who want all kinds of
other features. I created it for my projects, and it serves those
projects well.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Data injection problems
Next Topic: Do you want to develop PHP for the Web and make money
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 23:58:52 GMT 2024

Total time taken to generate the page: 0.05222 seconds