Encompas
Encompas is a PHP/MySQL frameword built to be fast and simple to use. It uses a modified MVC structure where instead of normal data models it uses DAT.
What's DAT you say? (cue laugh track)
DAT stands for Data Access Thing, yes, I know creative name for something that handles getting and setting your data right? DAT makes you not need to write SQL for 99% of the things you need to do. Although you may still need to write the SQL for a complicated aggregate query here and there, once you use DAT you will never want to write your own SQL again.
Getting Encompas
Currently I don't have a packaged version of Encompas, so if you are interested in trying it out, you will have to talk to me about it and I will have to get you an archive of the current version I have.
Why does the world need another PHP based framework you ask?
Well, it could be argued that it doesn't, but I think that my reasons are good. Existing frameworks for PHP:
- Sometimes have the imitation problem
It is not generally a good idea to create a framework in one language that tries to be exactly the same as another framework in another language. The languages are different, and natually have ... wait for it ... differences. There are things about PHP that make it ideal to accomplish a certain thing one way, and things about, for example, Python that make it ideal to accomplish the same thing in a different way. I like django, but I personally think that if someone tried to create a PHP version of it that it would be a disaster. - Sometimes have overly complex standards problem
Granted, on a large project being contributed to by many developers and designers in different locations and timezones it is probably a good idea to have framework imposed conventions for every little thing. But, that case doesn't hold true for 90% of the PHP based web sites on the net. You are coding your system, and you have ways that you like to code. For a framework to be used there are some conventions that have to be imposed, but really, c'mon, does it really matter if my class member variable is named $__somevar, $_X_sv, or $someVar? The answer: not so long as you have comments
.
NOTE: Self documented code is non-documented code. If you don't want to use code comments, fine, but don't lie to yourself and pretend that intuitive variable names are just as good. - Sometimes have the performance problem
Does the framework portion of code for your site take more time to execute than your actual work code? Don't like that do ya? I didn't either. - Sometimes have the template engine problem
Smarty is not the answer to all of your problems with designers messing up your systems! Yes, I said it, I will let that sink in. Before you open up an email and lambast me with "you smarty h8er" email, read my reasons.- While smarty provides a clear layer of separation between process code and display code, that only matters if you have no discipline. Need smarty for this reason? I bet you have a ton of credit card debt too...
- Smarty does not stop designers from breaking your systems. You can write smarty code that causes PHP fatal errors just like you can with PHP directly. Trust me, I work on a system with probably 200k lines of smarty template code and it happens a lot.
- While there are ways to reduce the amount, no matter what you do, Smarty still adds overhead to your system.
- Last but not least: Smarty is not, and I can't stress this enough, easier to learn than PHP. There is only one thing about smarty that is easier to do than in PHP, print a variable.
PHP: <?php echo $someData;?>
Smarty: {$someData}
Everything else is just different, not easier.
- Have the "No DAT" problem
So, this is something that could actually be solved easily by just adding DAT to an existing framework, but I just didn't find one I liked well enough to do it. I really like to use DAT. It makes my data life much easier than it was in the past. - Ego
I feel like a cooler person now that I have created my own framework. My next project is creating my own CPU that is x86_64 ... no, not really, I am completely not that smart.
If you dissagree with me after reading the above, please tell me. I have no issues changing my stance if new information proves it to be wrong.
