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 #177792 is a reply to message #177760] Sat, 21 April 2012 11:22 Go to previous messageGo to previous message
Tony Marston is currently offline  Tony Marston
Messages: 57
Registered: November 2010
Karma:
Member
"Jerry Stuckle" wrote in message news:jmrice$n8h$1(at)dont-email(dot)me...
>
> On 4/20/2012 4:27 AM, Tony Marston wrote:
>> "Jerry Stuckle" wrote in message news:jmp0gb$d8$1(at)dont-email(dot)me...
>>>
>>> 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.
>>
>> Building an entire ERP system with 1700 transactions is much more than
>> "simple". I work on business applications for corporations, not toy
>> systems for hobbyists.
>>
>
> Building a *decent* ERP is complex. SAP, for instance, has a good one.
> They have several hundred programmers working on it constantly.

That is because they have made it more complex than it need be, and they are
obviously not using a framework which does all the grunt work for them.

> What you call an "ERP" is nothing like that.

My definition of ERP is the same as that found in wikipedia at
http://en.wikipedia.org/wiki/Enterprise_resource_planning.

Note that an ERP system need not contain all of those modules, just two or
more would be sufficient.

>>> A large application is much more complex than just having "a large
>>> number of components".
>>
>> I disagree. An application which uses 200 database tables is more
>> complex than one which uses only 2, and the more tables you have the
>> more maintenance screens you require.
>>
>
> That's because you've never worked on a complex application. Your claim of
> an ERP is proof of that.

You obviously don't know what features are available in my ERP system.

> All you do is database stuff. There's nothing complex about that.

Correct. There is nothing complex about writing code which moves data
between the user interface and the database. That is why I developed the
Radicore framework, to take care of all that simple "plumbing" stuff for me.
My valuable time is spent on writing the code which deals with the business
rules, the "payload" as I call it, some of which are more complex than
others

>>>> > 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 applications are not overly large. While I have a large number of
>> small transactions each of which does one thing, this is not "bloat", it
>> is following the Single Responsibility Principle.
>>
>>
>
> Nope, they aren't, because your applications are just for database access.

They are not "just" for basic database access, they are for applying complex
business rules as well. The "basic" functionality is provided by the
framework while the business rules are provided by the programmer.

> But they sure sound like they're bloated.

The term "bloat" has nothing to do with the number of database tables.
Provided that the database has been properly normalised (you *DO* know what
the term "properly normalised" means, don't you?) and every table is used
somewhere then there is no "bloat" whatsoever.

In my book the term "bloat" is covered by unnecessary code, and I would say
that any application which you write which contains 3M LOC has much more
bloat than anything which I write.

>>> 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.
>>
>> I would like to see *YOU* design and build an ERP application basedon
>> those databases and then tell me it's simple!
>>
>
> I'd like to see YOU create a REAL ERP application! All you did was build
> database access to multiple tables. ERP is much more than that.

I know that. It also includes the application of business rules when
something changes state. An example would be: "when a sales order is
authorised it must be converted into an invoice, a PDF version of that
invoice must be created and emailed to the customer. The invoice must also
be in the language and currency of the customer."

<snip>
>>>> >> 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...
>>
>> You obviously don't know what "proper OO" actually means. And where did
>> I say that in order to change one item in the object the user has to
>> build an array for the whole thing? You are reading things which I did
>> not write.
>>
>
> Oh, I sure do. You said you don't have SET/GET functions. You said you
> set the values with an array. It's exactly what you said.

But I don't have to insert any code to create that array as it is already
provided for me in the form of $_GET or $_POST.

When data comes in from the database it appears as a single variable which
is an array of rows and columns.

>>>> 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.
>>
>> You are jumping to the wrong conclusion AGAIN! The default is to read
>> all columns simply because by default all columns are displayed on the
>> screen. The defaults can be changed.
>>
>
> Ah, so you have to write code to change those defaults. Once again not
> what you claimed earlier.

Any person with more than two brain cells to rub together knows that if the
default behaviour is not what you want then you have to write code to change
those defaults. I have never claimed otherwise. My framework generates
working transactions based on a lot of default behaviour, and in a lot of
cases the default behaviour is good enough. When it isn't you can change it.

>>>> > 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".
>>
>> Easy peasy. I just set these values in the database:
>> min_length = 8
>> max_length = 16
>> upper_case = 1
>> lower_case = 1
>> num_digits = 1
>>
>
> Bloatware. The code has to needlessly query the database, parse the
> results then apply them to the password, when a regex would do the job
> simply.

But where do you store the regex? In thin air? Different customers have
different rules, so each customer can specify the rules that they want on
their copy of the database. That is not bloat, it is sensible design.

> Bloat, bloat, bloat.
>
>
>>> 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.
>>
>> I have a validation class which is capable of validating every data
>> type. This means that I do not have to write the line of code which
>> tests that a piece of input is an integer. Not having to write that line
>> is not bloat.
>>
>
> Again, bloatware, when a simple function call like intval() will do it.
> You've added an additional and unnecessary layer of complexity to the
> application.

You are missing the point AGAIN. In your applications you have to write code
to call the intval() function. In my applications I don't have to write any
validation code because I wrote a general purpose validation class many
years ago, and it deals with that level of validation automatically.

Again you are writing code to do something which my framework does
automatically. And you have the nerve to say that my methods are crap!

>>>> > 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 is necessary if I want to allow the customer to change the password
>> validation rules without having to write any code. Not having to write
>> code is not bloat.
>>
>
> More bloat. And unnecessary. How often does the customer want to change
> the password rules? In about 35 years of programming for clients, I've
> never had that happen. And what about the existing passwords which don't
> match the new rules?

A customer may or may not want to change the rules after the software has
been installed, but as my software is used by many different customers each
one may want a different set of rules when it is first installed. I can
apply whatever rules a customer wants simply by changing his copy of the
database, and NOT by changing any code.

> Why stop with the password? Why not let the customer change the window
> layout, for instance? Or add tables and columns to the database?

Now you're going off at a tangent. I should quit while you're behind.

> Your code is just bloatware and adds an unnecessary layer of complexity to
> the code.
>
>>>> > 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.
>>
>> If you were really clever you wouldn't have to copy/paste/modify, you
>> would have a reusable module. In my MVC implementation I have a fixed
>> set of controllers, and each controller is reusable. Can you say the
>> same in your framework?
>>
>
> Doesn't make any difference. How do you handle displaying the same
> information two entirely different ways on two different windows? Mine is
> simple and straightforward. It is also easy to maintain.

So is mine.

>>>> > 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!
>>
>> What I'm saying is that I don't have a function which splits the $_POST
>> array into its component parts so I can then use a setter on each
>> component, I simply inject the entire $_POST array in a single operation
>> without the need to split it down into its component parts.
>>
>
> So you do have a function which does the work. That's not what you said
> earlier.

Read what I wrote. I do *NOT* have any function which splits the input
array, be it the $_GET array, the $_POST array, or whatever, into its
component parts. All database data exists in the database table object as an
array of rows and columns.

> I never said I had to split it down into parts, either. I have a member
> function which handles the input. But I guess that's just too much for you
> to understand.

I beg to differ. You specifically wrote that you have getters and setters
for each individual column/field. I do not have code which splits an array
into its component parts as I can access any component part while it is
still sitting in the array.

>>>> 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.
>>
>> The definition of polymorphism which I use is "same method, different
>> implementation". What definition do you use?
>>
>
> You've got a *partial* definition. Polymorphism is only applicable when
> the two classes have a parent/child hierarchy, and the child class has a
> method of the same name (and in some languages, the same parameter list) as
> the parent.

The definition of polymorphism does NOT state that the classes have to exist
in a parent/child hierarchy, only that they have the same method signature.
Having said that, it is usually the case that the two classes ARE related.

> When there is no parent/child relationship (as in the case of two different
> database tables), there is no polymorphism.

Then you obviously haven't used an abstract table class which is inherited
by every concrete table class. All my concrete table classes have instant
access to all the methods and properties which are defined just once in the
abstract class.

>>>> >>> 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.
>>
>> Just because it's different from yours does not make it crap.
>>
>
> It's not because it's different that it's crap. It's crap because you've
> shown here it's crap.

Only in your tiny mind.

>>>> >>> 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.
>>
>> Then you obviously have not experienced the complicated things which
>> need to be done in an ERP application.
>>
>
> Obviously neither have you. What you have is not a real ERP application. I
> suspect your customer would do as well with an Excel spreadsheet.

It is real enough for my paying customers, and it is THEIR opinion that
counts, not yours.

> And I wonder what your customer would think if he knew you were taking
> credit for his hard work in building his business.

The comment that my software helped that particular customer in that way was
actually made by one of the directors of that company.

>>>> > 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.
>>
>> That may have been the impression that you got, but you have indicated
>> time and time again that your mind works in mysterious ways.
>>
>
> Yea, I live in the real world and have real world experience. Unlike you,
> who seems to live in some alternative universe where you can make up any
> rules you want and can ignore those you don't like. You can call a simple
> database application an ERP and take all the credit for your client's hard
> work.

It is much more than a simple database application which does nothing more
than move data between the user interface and the database. It processes a
large number of business rules, and it is the number and complexity of these
business rules which decides whether an application is actually complex or
not.

>>>> 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.
>>
>> You're the expert in horse hockey judging by the amount you write in
>> these posts.
>>
>
> Nope, I know how to program properly. You've obviously never worked in a
> corporate environment, for instance, where you have multiple programmers
> and have to learn good programming techniques.

I worked in several software houses for many years, and I dealt with many
different projects for many different customers. I was also project leader
on a good number of those projects. I also wrote the framework used in one
of those software houses as well as setting the development standards.

>>>> 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.
>>
>> What you really mean is that you are too ashamed to have it reviewed by
>> your peers, and that you are incapable of writing code which can be used
>> by others.
>>
>
> Not at all. I meant exactly what I said.

Yes, you can't be bothered to release it as it is only useful for your own
personal toy projects.

> Unlike you, I don't need my ego stroked.

That's not the impression I get from reading your comments in this post. You
seem to think that YOUR way is the ONLY way, and anybody who dares to
disagree with you is a stupid moron. I disagree with everything you say, and
as for being a moron, 99% of the emails which I receive on the subject on my
work are nothing but complimentary.

> But my code is reviewed by others quite often. Most projects I work on are
> collaborative. But then I work with programmers who know what they're
> doing, also.

I'd hate to on a team of programmers who all think like you as they would
all be unproductive and full of silly ideas.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org
[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 19:29:44 GMT 2024

Total time taken to generate the page: 0.07475 seconds