The problem, when there is a lawyer buried to his neck in sand, is that you ran out of sand.
— ajr58(1), Non Sequitur comic letters
Posted on 2017-Apr-08 at 20:40:25 by Phil
Is it feasible to build a general purpose application framework, into which you could plug modules for forums, stores, galleries, blogs, etc.? There’s a lot of overlap between various applications — they often have very similar code for registration, login, and logoff of users; permissions for handling guests versus logged-in users of various levels (plus administrative and moderator user levels) and what they can see and what they can write to; low level database access routines; user interface design and templating; and probably other stuff. The framework would handle all this common stuff, providing a consistent look and feel across all modules, and a consistent API for the modules.
One thing that must be taken into account in the design of any application, including this one, is that most people putting up a website are neither Computer Science majors, nor looking for a new and all-consuming hobby. They are looking for a tool or appliance to do what they want without a lot of blood and sweat and tears. At the other extreme are people who love coding and want to be able to modify and customize this thing to their heart’s content. Can both groups be satisfied? Most site owners would be delighted to have something they can drag and drop pieces into, and use a dashboard to give them a helping hand in tuning the thing. If these people want a toaster for their kitchen, they’ll go to a store and buy one. They don’t want to play engineer and design a toaster themselves, source all the components, and assemble it themselves. Other people relish the challenge.
If an application framework (plus the applications plugged into it) requires PHP coding skills to make modifications (including successfully installing third-party modules), that will drive away a substantial part of the market. However, relying solely on hooks and plug-ins may be too limiting for other users. So what’s the happy medium? Can you have hooks and plug-ins that won’t be broken if you (carefully) manually edit the code? With so many extra layers and interfaces to go through, can you get reasonable performance?
People with experience in applications are welcome to comment here. I’d especially like to hear about experiences with Wordpress, which seems to have an almost infinite library of plug-ins — do they work well for all levels of coders/maintainers? People with experience in Drupal, Joomla, and other Content Management Systems are also welcome. I have long had a concern that most CMSs put too much in the database that should really be in code files, imposing a heavy server load and/or limiting what can be done. I’ve never liked the idea of having to edit some HTML (or just text) in the CMS’s editor and then have it disappear into the database, to re-emerge somewhere else later, on some page. I would personally prefer to write PHP code to put out that page, calling on common routines to make sure it all fits together nicely.
Your thoughts?
Posted on 2017-Apr-28 at 04:32:33 by BrockleyJohn
I have implemented a number of Wordpress sites and made changes to many more. WP’s reputation of being easy to implement and update rests largely on the admin features for installing and updating versions and plugins; that and the easy lookup of plugins, reviews of their quality and compatibility information.
In practice, someone wanting to set up their own site for e-commerce, marketing or, generally, something more than plain pages and a blog will typically need one or more paid plugins (or a paid theme consisting of them) unless they are prepared to compromise significantly. Very often these do not come with maintenance updates outside a paid agreement.
People ask for a site to be built for them based on WP on the assumption that when they get it back they will be able to look after it themselves. They are recommended WP as the suitable platform for their site by the mentors whom they pay for regurgitated internet wisdom.
There is a middle ground of savvy owners who benefit from WP as a platform; not into the nitty gritty of coding but with a logical bent and willingness to dig around and find where to change things. If they are able to commit the time, they can find themselves a set of building blocks and get them to stick together in something approximating the desired shape, without needing to be a developer.
BUT.... it’s.......... reeeeaaaaaaaally................................................. ................................. slow
especially with themes that offer responsive design and visual editing, although this may be better now that some of this is built into the core
It seems to me that WP sites which are proper applications are best avoided unless on wordpress-optimised hosting. I’ve no idea what this really consists of but guess it might be some clever kind of caching.
What you’re talking about sounds like a high-level framework with a common set of modules that are extensible... and a real datamodel that’s not crammed into blog posts and categories.
I don’t know but maybe somewhere like Ruby on Rails is a place to start? My knowledge is limited to a quick google search!
Posted on 2017-Apr-28 at 13:38:09 by Phil
Hi John,
Thanks for the feedback, and welcome aboard! It’s good to get real world experience about using frameworks and such, rather than just dry academic theory. You mentioned things like visual editing (WYSIWYG), which I personally dislike, except for very simple markup -- it always seems to get in the way of serious work, but some people can’t live without it. Likewise, putting all your pages in the database seems inefficient to me, as well as being a constraint on how you can customize pages. WP started life as a blogging platform, and that has imposed some limitations on what can be done with it.
At this point, I don’t know if I’m actually going to try doing something with a new framework… I’m just gathering information for right now, and hoping to get a discussion going.
Phil
Posted on 2020-Jun-24 at 19:02:34 by Phil
One of the things I dislike about CMSs is the insistence that they control all aspects of a page. Another thing is that it may be hard to mix in data from outside of the CMS database. I propose that in general, a developer can create a PHP framework (using a library of common functions) for page(s), and some or all of the data can come from any database or other data source. This way, data could be easily drawn from all sorts of sources, such as corporate databases (independent of the CMS database). The structure and layout of the page can be easily tweaked, mostly in PHP.
This application framework could still offer one or more “generic” pages to fill with data, along with a GUI to allow content to be entered into the CMS database. This might be the preferred method for many application owners, with a shallow learning curve. Programmers who enjoy a challenge could create their own pages, populating the content with data sources to meet their needs. Hopefully, the overall learning curve could be a lot flatter than with most CMSs, both simple to use and flexible to be easily extended.
Posted on 2022-Mar-21 at 15:56:00 by Phil
Recently, I finally got around to trying a Drupal installation on this site.
I installed it separately under its own directory /cms1,
so I could
later redirect to it, and immediately ran into problems, as there are apparently
sections of Drupal that believe they are always running in the installed
directory. That is, links I put in showed as “native” (in
/
) and redirected properly via .htaccess,
but the
built-in links insisted on adding /cms1
to the visible address.
These included things like /user/login, /user/logout, /user/contact, etc.
The Drupal support community was useless… their suggestion was that I go to a “better” host, and not to use Softaculous to install it, as it probably was customized to work with Softaculous’s installer. I may give Drupal another shot later, but my first experience was underwhelming.
Posted on 2023-Aug-30 at 21:58:00 by Phil
A few more random thoughts:
Posted on 2023-Sep-03 at 12:36:00 by Phil
It’s very important to be able to mix PHP code in with what are otherwise static pages. For instance, a store might want to display its “open” hours, or an online business its help line hours. These could change over the course of the year due to normal schedule changes, a pandemic, or an upcoming holiday (bank holiday for our friends across the Pond). It’s certainly possible to manually update an HTML page or subpage for something like a schedule, but it would be nicer to be able to read a schedule list and format it as desired. It might include normal store hours and the upcoming hours for the holiday weekend as an aside. After the schedule change, the special hours listing can disappear until a few weeks before the next schedule change. This could be done in PHP and perhaps a database. As customers often use a store web page to check whether it’s open, this would be a good way to keep the posted schedule up to date, without having to remember to manually edit page(s).
When I tried migrating this site to Drupal, one of the things I had to deal with was elevations of mountains in the Catskills Gallery. What I have is a drop into PHP, to call a function that nicely formats the elevation (in feet) and its equivalent in meters (e.g., “Slide Mountain - 4120 ft (1255 m)”), given an input of ‘Slide Mountain – <?php print elev(4120); ?>’ in the text). I ended up having to manually calculate and round the meter value and hard code it into the text. While this isn’t an overwhelming task (mountains don’t uplift or erode that quickly), there might be other figures in text that do need to be updated frequently, or even retrieved from a database.
Such function calls within text would usually need custom PHP routines (written for the site). Whole sections of a page could be generated on the fly. Requiring textual content to be static and stored in a database can be quite limiting. If a page is stored in a database, after the text is retrieved, it would have to be examined for “escape” sequences to be passed off to PHP in some manner.
All content © copyright 2005 – 2024
by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this
site remains under the copyright and license of its owners.
Catskill Technology Services, LLC does not claim copyright over such software.
This page is https://www.catskilltech.com/utils/show.php?link=building-an-application-framework
Search Quotations database.
Last updated Thu, 05 Dec 2024 at 9:40 AM