Archive for November, 2008
veryActiveRecord — seven12
السلام عليكم ورحمة الله وبركاته
7-12 framework now has better scaffolding and is clean urls [URL rewriting]
I’ve been working on it the last days but the very strange thing is .. I’m working shallow issues ..
Mainly, I forgot that seven12 have a MODEL problem .. Major problem .. it’s not yet an active record based one ..
so ..It’s not that handy if you tried to code your application if you didn’t not start from scaffolding then modifying, and in case you scaffolded you table you will still need to understand the fact of each model is a file and a different class which is -now- sounds so illogical to bind them all to a parent “doing a singleton connection–which almost nothing” class ..!
Sooo ..
I decided to code “veryActiveRecord” which will work on the 2-ways
1-it’ll enable you to have the row to object model
2-It’ll have the Object to row model through what I call “inversed scaffold”
Ex.
//normal active records ..
//assuming the table users exist “note the convention of plural table names will be fixed on scaffolding part ..”
//users table contains the four columns / fields id name email which is INT PK auto_increment NOT, varchar(50), varchar(200), respectively
$values=array(id=>NULL,
‘name’=>’Ahmed’,
‘email’=>’ahmed@ahmed.com’);
$user = new User();
$user->add($values);//this will work exactly like sending the query:
//insert into users values (NULL,’Ahmed’,'ahmed@ahmed.com’);
//user class contain relation parameter “class variable” describing the relation to other tables..
//which will be as high leveled as ROR “Ex. belongs to and has many ..”
Next is the inversed scaffolding ..
//my plan is to have no table sql already designed..
//developer will design how to handle the fields before creation
//inside the users class
$relations=array(‘has manyusers
‘,’belongs to
groups
‘);
$id = new intField();
$name = new strField(“unique”);
$email = new strField(“searchable”);
//and I’ll copy a feature from DJango calle s=dbsynch you will be able a fully compatible to your code SQL which can be directly or indirectly “copy paste to your console/phpMyAdmin” executed .
…
Well, It sounds a lot of code to write ..
but It sounds also sooo interesting when it’s done -that way- as it is a challenge for me ![]()
and I just love challenges ..
NOTE:
I’ll pause working on scaffolding for the moment ..
clean URLs will remain with the same procedure
better mail and better template engine is what I’m planning for ..
and there was a very important thing to talk about which I forgot while writing that topic ..
Make a prayer to remember ..
إن شاء الله ..
7-12-2008 will be a nice release isA
;may be the 1.0 release ..!
Salam
CAT SCOPE 9
$Scope ++;
We had a scope in case you don’t know
Quickpost this image to Myspace, Digg, Facebook, and others!
my life stream ..
Al Salam 3lykom..
here I’m posting again a piece of my life log:
I – returning from E3tkaf – faced a lot of problems mainly because I changed my life attitude in a very quick manner and it’s also said to be unexpected manner .
Eltzamt Technical Term given to ordinary Muslims in our countries nowadays when they try to show some of the discipline to some thought, acts and may habit of our Prophet Muhammad (PBUH).
For many many reasons – and I’m NOT intending to discuss them – we don’t mind seeing our dear friends smoke, don’t pray or even have girl friend++ and girl friend–
) “I really like this expression” .
And since long time you developed the sense of knowing who are the couples of your colleagues quickly not only for letting them alone -to talk- but also to make a prayer for them
-I’m really laughing now
-
and For other many many reasons – that I may discuss now – we are always thinking that someone with a beard should be familiar with the following items:
1-AK74 “a very harmful killing Russian machine my elder brother used to tell me about before joining the army – GOD Bless him”.
2-arguing and making everything “prohibited” for reason and for no reason.
3-will make your life miserable just because that there is a very few options to live a “Halal” life.
4-telling taxi-driver to stop smoking and stop the songs Kassite and may offer a new tape for Shaikh X or Y ..
and if the Taxi-driver didn’t obey .. he will use the AK74 :p
5-longer prayers and “3e6r” all over his hand .
6-attending religious courses .. and may be visiting grave yards and hospitals and he don’t mind the time he visits ..
…
and a very long list
…
And I’m here to talk about this list..
Some of these items are true and some are NOT….
Media, TV specially and Cinema-Terrorism related movies- developed some WEIRED impressions about normal Muslims also some times named “multazmen” .
And it’s exactly what you think, yes these films -specially if they were your only information source- let you feel that hatred and sometimes fear and may be bored to be with those guys who have a slightly longer beard ..!
and guess what I’m not also going to talk about why you shouldn’t think so or why you should think so ..
I’ll list all the questions that came/may come to my mind ….
1-Why we don’t mind that smoking guy and we do mind and look strangely at that guy with SEWAK …?
-known that Sewak is medically proven to be better than your normal teeth brush .. and I’ll not give a medical reference as I don’t check my prophet (PBUH) words .. you can google if you want for the miracle clearance sake
2-Isn’t it a great problem to have only 30-40 man in the mosque on each prayer .. and less in Fajr .. in ISLAMIC Countries ..?
3-Can’t you see how peaceful life we are living – thanks to our deeds – and we are not trying to change .?
4-do you think we are thanking Allah enough .. if not – and it’s sure not – why we don’t pay attention ..
5- why we always think that people who may have the chance to change and show that change are just showing …يراؤون
6-why we don’t feel strange from the long hair and colored hair and lens while we look strangely and ask “enta estashya5t” when we see a long beard ?
8-Do we really feel afraid when we are invited to Masjed .. from the AK74 or from being said to be ..
M3a2ad ..!
9-Do we think that 27th Ramdan night is special night and 28th is not ?
10-why do we always complain about how rich the actors, singers , dancers ..etc are while we are sacrificing our life and we are not 10% rich or fame … known that we are still listening to their songs watching it and may dance with them and sometimes feel proud to take a picture with them :s
11-FOR GOD SAKE .. aren’t we bored from saying .. Muslims used to be rich, strong, fair and MUSLIMS..!
and finally
12- if Toshiba made a manual for your computer .. and Toshiba is the Manufacturer of everything in your computer..
would you doubt , think twice or even check the idea behind the rules written in the manual of Toshiba ..
specially if you weren’t a computer engineer ?
و لله المثل الأعلى
I was just charged and I needed to post these words as I passed a very long “STRANGE” period of my life since I U Turned on my life road
Sorry for long post ..
أستودعكم الله الذي لا تضيع ودائعه
