Template engines and more...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Template engines and more...

Post by alex.barylski »

I want to start on version 2.0 of my next CMS incarnation...

This time, using everything I've learnned building a file based CMS in conjunction with my years experience using DB driven web sites...

I think I've finally solved the crux of my problem, when using a CMS, but I'll leave that for another disscussion...I will say it has been solved at a conceptual level, which is what was really holding me back, bot so much the back end or implementation specific reasons...

Anyways, I would like to eventually release as open source, but also keep it commercial...I would release under something like LGPL, but would offer dedicated hosting, etc... as original developers of the CMS. Infact I want it to be slightly more...in the sense I'd like it to also act as an advanced file manager, upload, etc...also ability to create HTACCESS files, CHMOD directories, etc...and most possibly manage emails and sub-domains, etc...

A little over the top perhaps, but I've always wanted to offer an all in one package...

Anyways, soon I will likely start posting object API's which I need developed, for instance a login API, etc...which I will submit in the volunteer forum for anyone interested in participating...first I need to hammer out some new coding conventions, as admittedly mine are somewhat antiquated and an disscussion I had with arborint a while back has made me think twice about some of my conventions...

For instance, in C++ I used hungarian notation and when I switched to PHP that idea trancended somewhat although I used less specific types...

$arr_names, $str_address, etc...

I'm considering dropping the prefix in favour of brevity...and besides "address" in todays languages kind of assume the type "string" anyways right?

So if your interested in helping me re-hash some conventions and don't mind a stubborn coot reconsidering everything you say...that would be awesome...

Anyways, right now, i'm really working on file structure, application extensability, etc...basically I spend a great deal of time planning and designing...more so than programming on most projects I undertake...

I simply can't be bothered to hack out that extra fast bit of regex when members on here are already capable of giving me a quick and efficient answer...same goes for MySQL, etc...

Ok I'm done sucking up...

Seriously, while sketching out concepts, etc...I've strongly consider using AKAPJ adodb and template lite...

The problem is, I've also been working on my own ORM for a while and would like to see if it actually works as I think it might...same with a template engine...completely different approach to rendering templates than what exists today, but this isn't even in POC state yet so I might just wait that one out...

I would ideally prefer to just use a hi level API which would be called like: create_page($id, etc...) and would sanitize incoming data, etc and create the record...using a direct call to mySQL (I have zero plans on ever using any other DB engine to be honest)

As a future open source project, if you were to help out or contribute...would you prefer AdoDB and TL???

Or could I get away with hardcoding the MySQL, knowing I'd never need anything else realistically...same goes for template engines...

I use a PHP template engine...simple and same effects, but requires discipline...as templates can quickly get ugly and fast...but has the advantage of being low in fat and easy to modify for custom caching, etc...

Have a Google for bTemplate to basically see what I use...fast, effective and crazy flexible, as you use PHP as the native template language...

Comments, opinions, etc...?

Remember, for now this is all hypothetical...I haven't coded a single line yet, but hammered out quite a few details on paper...in concept it seems pretty solid...

Cheers :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: Template engines and more...

Post by feyd »

Hockey wrote::mega-snip:

As a future open source project, if you were to help out or contribute...would you prefer AdoDB and TL???

Or could I get away with hardcoding the MySQL, knowing I'd never need anything else realistically...same goes for template engines...
I prefer flexiblity. The more modular a system the better for most things I do. For example, I nudged d11 toward making Swift pluggable, toward using Composition, and possibly a few other ideas. Now I'm not going to take credit for getting him to do it, I just played my part in making Swift more modular than the original concept was.

By hardcoding MySQL, you'd force me to go through the code and add support for other databases. If too involved, I may be forced to use another project or build my own. I have better things to do with my time than to futz with 3rd Party code.
Hockey wrote:I use a PHP template engine...simple and same effects, but requires discipline...as templates can quickly get ugly and fast...but has the advantage of being low in fat and easy to modify for custom caching, etc...
And that's fine for a target audience of hobbist programmers or other developers, but CMS software is hardly targetting them. Sure you need to cater to hobbists and developers, but it's the end user experience that's at the heart of it all. People love modding things, and I can only see hardcoding for using PHP as the template engine as a possible road-block to that for non-professionals. Sure, when used for sole templating, the code is easier on the whole than say for image generation, but it still can be quite scary. Here's a compromise: a visual editor that writes pure PHP template files. It could take a while to develop, but could make JoeNewb get into it a lot faster.

I have to say I'm glad to see you considering open source more and more. It also means you can use more and more open source solutions for various parts. Less work on fudging, always nice.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Template engines and more...

Post by alex.barylski »

By hardcoding MySQL, you'd force me to go through the code and add support for other databases. If too involved, I may be forced to use another project or build my own. I have better things to do with my time than to futz with 3rd Party code.
Fare enough. In fact thats the same reason behind wanting to design my own :P
I have to say I'm glad to see you considering open source more and more. It also means you can use more and more open source solutions for various parts. Less work on fudging, always nice.
Admittedly, I wouldn't normally, but this particular market is soooooo saturated, with both proprietary and open source and considering my meager marketing/advertising budget, I think open source would be best in this case.

Besides that, I'm convinced the money to be made is selling to non-tech savvy users along with training, etc...

I figure I'll use heavy branding tactics, so any developer/designer who wishes to use my CMS might possibly pay, not for a per/user license, but rather a nominal per domain/rebranding license...

In marketing my previous version I have become aware that many a designer/developer will just fiddle with templates regardless, either unknowingly or deliberately breaking the LGPL code (at least this is the impression I'm under - copyright information MUST stay in tact both in source code comments, licenses, frontside, etc). So I'll just make it *very* clear that if one choose to do so, they *must* pay a fee/domain license...

Thanks for the input :)

Appreciated as always
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Slightly off topic, so I created a seperate post, but under in regards to my first post...

Anyone know of tutorials on how to use PHP to configure Apache so I could programatically create sub-domains, etc???

I'm aware sub-domains (at least under my shared host) are simply directories outside the docroot, but I assume there is some kind of mapping going on there?

I'm not looking for full fledged articles on sub-domains (ie: Apache docs) as I can likely find those myself, but rather specific PHP articles which disscuss creating .HTACCESS,

p.s-Basically i'm interested in setting up and configuring Apache, FTP, SMTP, etc...???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd look into building/setting up a dynamic-dns instead.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

A side from only knowing what DNS stands for and conceptually what it does...I have no idea (I can't see the correlation between CMS and DNS) what you mean...

It may sound wonky, a CMS would want that kind of control over it's server, but at the end user I think it makes a lot of sense, to have much of that functionality contralized in one place. At least, with my understanding of the subject I have managed to work and massage the GUI in such a way that it appears to work :P

Articles, etc???

p.s-For instance I'm looking at webmin as we speak, but I think it's done in Perl and I would prefer PHP...and articles would be best, so I"m not stuck digging through 1,000's of lines of source code...
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Are you targetting this towards dedicated/colo/vps owners specifically (managing subdomains/email's)? or more for the standard shared host/managed server (or both) ?

Based on the scope that I've seen so far, it seems that you are inching towards integrating a full-fledged cms system into a control panel such as cPanel, which is a very very decent idea (i'd love to see the cPanel/et al have some decent competition)...
Post Reply