Scott
So, your framework is a framework, like any other framework.
Oh, but wait. It is even better! It has a beautiful 9000 line abstract monster class, no unit testing and legacy code from PHP4 days! So, already, the todayâs devs with the frameworks out there could probably run circles around yours over time. But we know. You donât care. You are pragmatic and you deliver results. All the rest is just nonsense.
There, I saved you from making your typical rebuttal.
Scott
Anything which satisfies the four distinguishing features described in https://en.wikipedia.org/wiki/Software_framework is a framework.
[quote=âs_molinari, post:22, topic:191138â]
Oh, but wait. It is even better! It has a beautiful 9000 line abstract monster class, no unit testing and legacy code from PHP4 days! [/quote]
The size of classes is not a distinguishing feature of a framework.
Unit testing is not a distinguishing feature of a framework.
The mixture of both PHP4 and PHP5 code is not a distinguishing feature of a framework.
Iâll believe that when I see it. Can you point to ANY framework that has all the features and capabilities of Radicore? No, I thought not.
Letâs go that route and see what we can come up with.
What would you say is Radicoreâs best 3 features?
And Iâll go ahead and list off some things directly in, or you can get very easily for, Symfony, which are IMHO, absolutely necessary for a framework to be used in an Enterprise/ large application scenario.
- A DI container? Yes, we really should continue the argument on testable code and the ability to introduce/ inject application cross cutting concerns, like logging or emailing . The DiC has to be one of the best features of todayâs frameworks, which make them âenterprise readyâ.
- The ability to allow external programs to connect to it through an API, like through a REST API?
- Any type of connectivity to support SOA?
- A powerful templating system to create any type of page (also âbackendâ pages)?
- Is it relatively easy to control and manipulate static assets like JS, CSS and image files?
- ACLs? An authorization system for any form of object the client dev can dream of?
- The ability to create console/ shell commands or applications?
- i18l? Can translations be exported to XLIFF files?
- A very handy profiler, which allows client coders to see how their app is working in general or assist in troubleshooting?
- Support for security and continued bug fixes for free for at least 3 years? I donât expect the âfor freeâ, but with Symfony it is! That is just a really nice bonus.
- Edit: And letâs add Composer to the list, to be able to add 100s of bundles for Symfony and 1000s of PHP libraries programmed by the â99.9% of those other devs who are just sheepâ in your mind.
Scott
Oh, I canât leave this sitting either. If that is now your standpoint (which often seems to change, as it fits your argumentation), you need to go and correct your statement and definition of what a framework is and how you basically said Laravel is a library and not a framework.
Just to refresh your memory.
If you have to write your own code to call the framework components, then it is not a framework, it is a library. A âtrueâ framework is in fact a mini-application with which you should be able to both generate and run your application components.
Scott
My definition of the differences between a library and a framework have not changed. It conforms EACTLY to the definition found in that Wikipedia article.
What is wrong with that description? Inversion of Control (IoC) requires that the processing flow be controlled by a framework component, not user code. This means that the framework should call the developerâs code, not the other way around. The framework code should also provide default behaviour. Take this one step further and it should be possible to use the framework to generate a working component which has this default behaviour. The only code that the developer should have to write is when he wants to override or extend the default behaviour.
These are the features which exist in Radicore but not in Laravel, as exhibited by the huge volume of code that the Laravel developer has to write in order to produce some basic CRUD screens. Compare this with Radicore where the developer can create basic CRUD screens without having write a single line of code - no PHP, no HTML, no SQL.
I can count higher than 3. How about these:
- Role Based Access Control (see http://www.tonymarston.net/php-mysql/menuguide/index.html)
- Audit Logging (see http://www.tonymarston.net/php-mysql/menuguide/appendixl.html)
- Activity based Workflow (see http://www.tonymarston.net/php-mysql/menuguide/appendixm.html)
- Data Dictionary (see http://www.tonymarston.net/php-mysql/menuguide/appendixn.html) which allows Model classes to be generated from the database structure.
- Transaction Patterns (see http://www.tonymarston.net/php-mysql/dialog-types.html) which allows user transactions to be generated from a pre-defined series of patterns.
- I18N (see http://www.tonymarston.net/php-mysql/internationalisation.html)
- Advanced security features (see http://www.tonymarston.net/php-mysql/radicore-security.html)
- Online help text (see http://www.tonymarston.net/php-mysql/menuguide/appendixf.html)
- Virtual Private Databases/Row Level Security (see http://www.tonymarston.net/php-mysql/virtual-private-database.html)
- Support for multiple sessions from the same device (see http://www.tonymarston.net/php-mysql/client-clones.html)
- Solution to the âback buttonâ problem (see http://www.tonymarston.net/php-mysql/backbuttonblues.html)
These are features which solve user problems, not developer problems, so things like DI containers are completely irrelevant.
Ok. We found a common feature.
Can also be turned on in Symfonyâs ACL component.
Not only one but a number of possibilities with Symfony.
I think Doctrine fills most of the concerns your Data Dictionary covers.
You lost me on this one. I looked through the docs, and only could come up with âWTF!â
Same with Symfony. For content translations, there is also Doctrine extensions.
Nothing special really. All in or extendable for Symfony.
Help text is content. Sonata can do content too. It would be too hard to program a help page system either.
With Symfony ACLs you can get field level security.
I am not sure what your multiple session system is for, but, with the proper permissions, you can log in as any user in a Symfony app in a separate window too.
Ok. This is another one where I go, âWTF!â Iâve never heard of the back-button being an issue for a server-side application and I read the linked page. It made me no wiser.
And, you missed the bigger points.
- SOA support. SOA being terribly important for an Enterprise application.
- REST (one way to connect).
- Templating for free style page creation.
- Composer support, so I can easily include libraries (and their changes from the 1000âs of devs supporting them) for the extra problems my own users asking me to solve.
- Unit testing, so that when I add the external code and my implementation of it, I donât have to manually test all the parts of my application again manually, to make sure things arenât breaking internally.
But how much code do you have to write to use this ACL feature? Radicore comes with its own database and maintenance screens, so you donât have to write any code at all.
But does it have an pre-built AUDIT database and a set of screens instantly available in the framework to view the contents of the AUDIT database?
But you have to write your own code to use workflows. With Radicore you do not as it contains a separate WORKFLOW database and a set of maintenance screens. You do not need to write any code to use the workflow system.
Again you have to write code. With Radicore you use the screens within the Data Dictionary to import your database structure into the DICTIONARY database where you can amend the details before exporting each tableâs details to produce its own class file. Does doctrine have its own database and a set of import/export screens?
So you donât now what Transaction Patterns are? So you have never worked on an enterprise application which access hundreds of database tables using thousands of user transactions? If you had you would have noticed that several user transactions can follow the same pattern of structure and behaviour but where the only difference is the content.
But does it allow you to define separate tables for different translations of particular database tables, and does the framework automatically switch to those tables when you specify that you want the output in a different language?
But you have to write code in order to incorporate those optional extensions. With Radicore you do not.
This is about ROW level security, not FIELD level security.
It means that on the same device you can login as many times as you like to the application and each browser window will have its own session, not a shared session. This means that the user can browse through one part of the system in one window and another part in another window.
You have never heard of the âback buttonâ problem? Have you tried google?
I do have support for web services, but that has to be customised for each userâs requirements.
I do not have templating for free style page creation as it has never been a user requirement.
I do not have composer support as it is not a user requirement.
I do not have unit testing as it would be far too expensive to retro-fit into an existing and huge application. Besides, it has never been a user requirement, and no user would be willing to fund an exercise that would take longer than the original product development and produce no visible benefits.
Now you are talking about being more at an application level and not a framework level. Of course, there is no premade screens for accessing the stored logs. That is up to the client developer.
The language in Symfony is stored in different language files and transpiled to PHP a single time, so the code is ready at run time. No database calls. And yes, if you change the locale, the retrieved language is changed too.
As a software framework, the base behavior is supposed to be extensible through code (too). That is one of the main reasons to use a framework. You force your solution on your customer. Some might like that, others might not. It doesnât make your framework any better.
I know what a transaction script is. I have no idea what you are explaining on the page you linked to. You do explain what a transaction pattern is here: http://www.tonymarston.net/php-mysql/infrastructure.html#controller.script
And if you read this gem about âanemic modelsâ, if fits to what you are doing like a tee.
Field level security is a higher resolution for security. I am sure row level security can also be accomplished fairly easily.
So, in other words, because Symfony does have these things or at least can be very easily added, Symfony is way ahead of your framework. It might not be your customers asked for these things, but if they use Symfony, they can.
Scott
The fact that you have to write ANY code to use these features says it all. People like my framework specifically for the amount of code that they DONâT have to write.
It is built into the framework but instantly accessible to every application Model class without the developer having to write a single line of code. Logging for a particular class can be turned off by unchecking an option on a screen. The screens to view the logs are also available without the developer having to write a single line of code.
So what happened when you have descriptions in your PRODUCT database which need to be shown in the userâs language? I provide database tables and maintenance screens so that the user can define his own translations, and the framework will automatically retrieve from these tables when requested. All without having to write a single line of code.
I do not force my customers to use these options, yet all my customers - who are large corporations purchasing my enterprise application - expect those features to be there as standard.
The link I included in post #27 was this: http://www.tonymarston.net/php-mysql/dialog-types.html This contains a link to another article http://www.tonymarston.net/php-mysql/transaction-patterns.html which describes what the Transaction Patterns are.
Now you are contradicting what you wrote in http://www.sitepoint.com/community/t/dependency-injection-breaks-encapsulation/113596/167 where you described my abstract class - which is inherited by ever Model class - as a âmonsterâ class, a âgodâ class which tries to do everything. Which is it, then? Is it a class that does everything, or is it a class that does nothing at all?
In case you canât read let me explain it to you - every Model class in my application takes care of all the validation and business rules that are required by its business entity. None of the other objects - the Controllers, the Views and the Data Access Objects - contains any references to any application components - no table names, no column names, no validation, no business rules. This is precisely as it should be - unless you want to argue the exact opposite.
But you donât KNOW.
No. I consider my framework to be superior because it has volumes of features which can be accessed without the developer having to write a single line of code. This makes it easier, faster and less prone to error as the prewritten code has already been debugged.
Says what? It says the client coder of the framework has it in his hand to take care of, just like a software framework should offer. The fact you give the control to others says only that. Youâve made it easier for a non-coder to control access, which means youâve written an application layer, like the client coder would. Sonata, for instance, is the same type of âback-endâ application built on Symfony and allows the user to control ACLs too.
Again, this is application level work. This all isnât part of the definition of a software framework anymore.
Like I said above, there is an extension for Doctrine, which allows the translation of the content, which would reside in the database.
I think you should call your framework a platform, because it is more than just a software framework.
I am not contradicting myself at all. You are typically twisting things for your own prerogatives. Read the Wikipedia article carefully. It says nothing about âdoing nothing at allâ and it sounds a lot like what you are doing with your transaction pattern. Martin Fowler calls that pattern âan anemic domain modelâ, simply because the logic is put incorrectly in a central place. That central place is your monster class? Oh yesâŚ
A Transaction Script organizes all this logic primarily as a single procedure, making calls directly to the database or through a thin database wrapper.
The fact your monster class is a class and not just a procedure just shows how you have no grasp of OOP, if anything.
I can read and you can stop with your condescending tone. It is one thing to be ignorant. It is another to be ignorant and arrogant.
I actually donât want to argue about anything, when it comes to you and your fabulous framework. But, you always push it to the forefront, like it is the holy grail of software frameworks, when it isnât. It is a mountain of old legacy code, that has had its day. Those days are numbered. Iâll bet on it. Any company with any decent IT group, who has even the slightest knowledge of PHP coding standards and best practices wouldnât come even close to using your framework. Iâd bet money on that too. The fact you can still sell it only shows how ignorant some companies are.
Iâve never done it, so no. I donât know.
And even then, when I think about it, row level access is actually not the right type of access control for an enterprise. Better would be a hierarchical access to data, which models the enterpriseâs organizational structure. I know ACLs canât do that, because it is a problem, which we still need to solve for our service.
You consider your framwork superior? We know this already. It is your problem. It isnât superior. It is inferior.
For instance, how many devs work on your âframeworkâ? (Iâd still call it a platform for the reasons you just mentioned). One, two? With Symfony and all the bundles available, there are 100s. And, there are 1000âs of people testing these bundles and reporting bugs everyday. Your platform doesnât have that luxury either. So I say, Symfony blows the doors off of your platform from a software framework standpoint by a long run. As a RAD platform, you might have the lead, but Iâd still not touch your RAD platform, as it is not up to todayâs standards. You can argue all you want about what todayâs coding standard are and all you will be doing is wasting everyoneâs time. Your platform simply doesnât meet them. Period!
The framework should provide default behaviour which you should be able to use without writing any code. The only time you should need to write any code is when you want to override or extend this default behaviour.
I disagree. It is a component of the framework that is available to every application which is generated by and run with that framework. If it is a third-party component which you can only incorporate into your application by having to write code, then it is not part of the framework, it is a library.
If by a âplatformâ you mean a âsuper frameworkâ or âmore than a frameworkâ then by definition you are saying that my framework is âsuperâ. I will take that as a compliment
Yes you are. In one post you describe the abstract class which is inherited by every one of my Model classes as a âmonsterâ class, a âgodâ class which tries to do everything, and in this discussion you describe it as a perfect example of an anemic data model. According to that Wikipedia article which you quoted this means the following
If you bothered to study my frameworkâs structure you will see that it implements both the 3-Tier Architecture as well as the MVC design pattern. This means that each Model contains code for data validation, business rules and task-specific behaviour, while all control logic is in the Controllers, and view logic is in the Views, and all data access logic is in the Data Access Objects.
This quite clearly shows that my Model classes DO NOT conform to that description of anemic domain models.
I repeat, all business logic is contain in, and only in, the Business layer, which contains all the Model classes.
A component script in my framework (see http://www.tonymarston.net/php-mysql/infrastructure.html#component.script for details) is not the same as the transaction script described by Martin Fowler
A transaction script has all the model, view and controller code in a single monolithic script, but my component script has just three lines, as shown in the following example
<?php
$table_id = "person"; // identify the Model
$screen = 'person.detail.screen.inc'; // identify the View
require 'std.enquire1.inc'; // activate the Controller
?>
Does this match Martin Fowlerâs description?
What ARE you taking about? My monster class, which is in fact an abstract class which is inherited by every one of my 300+ Model classes, contains all the methods necessary to enable effective communication between Controllers, Views, Models and Data Access Objects. It demonstrates the use of encapsulation, inheritance and polymorphism, so to say that it is NOT OO is unbelievably ridiculous and shows that YOUR grasp of OO is the one that needs to be questioned.
You seem to excel at both.
When you consider that the whole purpose of this discussion is âWould you agree that this is a definition of a PHP frameworkâ instead of a library, then I must surely be allowed to describe how MY framework conforms to the four characteristics as described in https://en.wikipedia.org/wiki/Software_framework. Instead of discussing those four characteristics you, and your fellow members of the âparadigm policeâ, can do nothing except attack the method in which I have implemented them. Trying to have a sensible discussion with you is nigh on impossible. You are not concerned with the results that I achieve, only the âimpureâ way in which I achieve them.
I sell my software package to companies who either donât have an IT department, or donât have one which is capable of writing their own enterprise application. Coding standards donât mean anything to them. There are only three things they are worried about
- Does the package do what they want?
- Is it value for money?
- Can it easily be extended and customised?
My software appears to be ticking all those boxes with a lot of big corporations, and I place more value on their opinions, and that of my business partner, than I do on those on a bunch of know-it-all developers who have never written an enterprise application in their lives, let alone a customisable package which can be sold to may different organisations.
Then you would be wrong. My latest customer has specifically asked for row level access in a certain part of his application, and this I have been able to provide for him, thus beating a rival application which could not.
You believe what you want, and I will believe what I want. I put my faith in the customers who are willing to pay big bucks for my enterprise application and my framework and not some know-it-all developer who has never written his own framework or enterprise application.
Symfony is a collection of libraries and third-party plugins, it is not a framework.
I donât care about todayâs coding standards as they are just a passing fad. I prefer to stick with those standards which have stood the test of time.
So you are redefining what a software framework is now?
Nope, it is part of the application using the framework.
Oh my. NO! More than a framework yes. You have done application level work. A super framework, as in super good! HAH! No way.
Which youâve constantly said are all dependent on your abstract monster class for their methods.
Are you kidding? From that little piece of code, Iâm supposed to surmise that? That is like me looking at the hood of your Mustang and asking me to tell you what type of spark plugs are being used.
Hah! You said it again.
You thinking you are encapsulating and following SRP with a 9000 line, 100+ method class is the ridiculousness here. Nothing else.
Yes, letâs get back to the point. Funny, I say you do âapplication level workâ and then you say, no you donât and yet, your definition is the following.
If you have to write your own code to call the framework components, then it is not a framework, it is a library. A âtrueâ framework is in fact a mini-application with which you should be able to both generate and run your application components.
So which is it? Are you doing application level work with your framework, or arenât you?
Well good for you. It doesnât prove me wrong, nonetheless.
You see, that is where we differ completely. I know I donât know it all, where you think you do and seriously donât.
But, it does fulfill the four points of a software framework, which you said is all a framework needs to do to be one.
Oh brother. A passing fad? Right Tony. First, you are admitting that there is a standard. Something you hadnât done earlier. So Iâll take that as a win.
And you might be right. What we are doing today might be different in the future and probably will be. However, the standards we use now are what most good programmers are using and you can be rest assured, we are never going back to PHP4 or early PHP5 days of coding. Those days are long gone, just like your hole punching Cobol days. Why arenât you still programming like that? It was great at the time, wasnât it? You missed the PHP advancement bus 10 years ago and you arenât even trying to get back on it. That is your only real and major mistake.
Scott
@tony_marston404 Why is it so important to you to argue over whether something is a framework or a library (or whatever)? Even if the PHP community suddenly decided, en masse, to adopt your usage of the word framework and rebrand Symfony, Zend, Laravel and the like as libraries, what difference would it make?
I would argue that this thread is not constructive and should be closed by the mods.
I think what he meant there is his framework has a solution to the form re-submit issue (back button on browser & hit refresh) where a user can use browser history to go back & re-submit a form by hitting refresh. Umm, people learned to solve that particular thing like 10-12 yrs ago & thats touted as a feature of his framework?!! Oh my! I guess he doesnât know about simple things like redirects on form submit (thus no way to spoof re-submit that damned form via history) & nonces. 10 yrs from now heâll learn about CSRF attacks, nonces & that will be the new advanced security feature in Radicore.
Also, he mentions 3 ways of maintaining state for a user - hidden fields, cookies & server side sessions & promotes server side sessions as best. Right, because every web app needs only one server to run, nothing more than that.
I think my IQ just dropped 20 points to 120 after reading all that, though its good to see level of my patience has increased significantly having gone through all that (new personal best)!
Radicore is an âenterpriseâ framework and since it most likely will sit (actually will have to sit) behind a firewall and only have external access through a VPN, such security features arenât necessary. Things like using nonces or CSRF protection are solutions to problems Tonyâs framework doesnât have. Did I do a good job there Tony?
It would mean I and probably a good number of other people would lose a lot of respect for the PHP community.
That is a actually good lead into getting back on topic and to the whole point. The issue here is, Tony has built what he calls a framework, but has also done client coding to âeaseâ their workload, which is fine and dandy.However, he considers that client code part of a good framework and anything less is just a library.Whereas, the frameworks of today do not have much client code at all. And they shouldnât. The frameworks should be a foundation for any number of applications, even the basis for what Iâd call an extended framework or platform, like Tonyâs.
The only real problem we have here is Tonyâs own feeling of inadequacy with his framework. Oh, he wonât admit that he has this feeling and he probably doesnât realize he has it himself. It is most definitely subconscious. But, the feeling of inferiority clearly drives his motivation to pick out articles on websites like Sitepoint to point out how inadequate a framework is, so he can prove (more to himself than anyone else) that his framework is more than adequate. If he were actually sure of himself, he wouldnât need the âmental reductionâ of other frameworks to âlibrariesâ or the constant fighting he does against modern PHP methodologies or the long winded reasoning on his website for why he does things, as he does them. Deep down inside, he knows what he has is a lot of CRAPpy code. Deep down inside, he knows the PHP world is flying past him.
Again, he wonât admit to it. Instead, he not only doesnât stay quiet and simply be proud of his work, no, at any chance he finds, he tries to lower the value of other peopleâs work. Or insults them by saying they are incompetent or monkeys or whatever else he finds to belittle everyone else, which raises himself internally to a higher, better place. It is called a superiority complex.
Nonetheless, I am using Tonyâs superiority complex as motivation to learn myself. It is like a sparring partner in boxing (and just like in boxing, sometimes punches go too low). I am sorry if that gets on peopleâs nerves and apologize for the low blows (which mods have deleted), but I find it fun and I am learning a ton while sparring with Tony and no, not to learn what Tony teaches, although not all of what he says is completely wrong. In fact, some of it is completely right. However, the basis from which he works off of, his âframeworkâ and his antiquated coding style, is totally not right at all from a modern coding perspective. It is this basis, that holds Tony back IMHO. Again, he wonât admit it. And to be honest, I hope he wonât. Iâd lose a sparring partner.
Scott
Just as a note to show what a young company is looking for in a PHP software framework, I just ran into this very good post.
Very enlightening insights. I love this sentence:
Believe it or not, all of the following factors matter first for the business, then for the developers.
Scott
Well said