I will just post here what had been posted at a different forum, I can't remember where. But this patch had been useful to me to add functionality of PostgreSQL's Schema to be seen and used inside symfony.
symfonyMultipleSchemasPatch-1.0.10.patch
17.9.08
8.9.08
Automated psql from the command line
So I will not forget how to do this.
To run my script in postgres without logging in:
I set the environment variables $PGHOST $PGUSER $PGPASSWORD $PGDATABASE
then run the postgresql script : psql $PGDATABASE -f sql_script.
To run my script in postgres without logging in:
I set the environment variables $PGHOST $PGUSER $PGPASSWORD $PGDATABASE
then run the postgresql script : psql $PGDATABASE -f sql_script.
10.7.08
Trying out TurboGears
There are web frameworks and there are web frameworks. I had been using several in PHP:
Symfony (http://www.symfony-project.com)
CodeIgniter ( http://www.codeigniter.com)
CakePHP (http://www.cakephp.org)
And I have been exposed to these in python:
Turbogears (http://www.turbogears.com)
Django (http://www.djangoproject.com)
Pylons (http://www.pylonshq.com)
Currently, though, I involved myself in developing in Turbogears. As easy as it may seem, the problem with
This framework is the ORM is too simple. I don’t know I think it came to me when I think about using symfony project
that made refactoring to the model possible. Tried google-ing “Model Refactoring in Turbogears” but search almost
always comes irrelevant to what I was looking for.
Sincerely, there is no point in using ORMs if the logic of trimming extra data from your model still resides in the
controller. What happens, is, SQLAlchemy mainly becomes a database abstraction rather than an ORM. ( I see, hence mapper????)
I wish other developers would see it my way.
I am not against Turbogears. I like it. I love the way it handles things. I recently learned how to break down controller parts. The thing is
I am not used to using ORMs as database abstraction mechanisms. Might as well go with ADODB ;) ( hmmm at least I don’t have to code
SQL by hand) But that’s just IT! Naked Objects come to view. Every body is going down the way of minimalism. But just how far minimal
should one get? It doesn’t make sense anymore sometimes. People can really be difficult when it comes to decisions like this.
As for now, I will leave all my database queries in the controller, pass them to the view instead of doing the queries in the model, with the controller
being agnostic to what the model contains (WHICH SHOULD HAVE BEEN THE BETTER WAY).
And as far as I am concerned, both languages ARE FAST. It’s just up to the programmer just HOW FAST the software would be.
Good Morning.
Keep the tradition of knowledge sharing alive.
Symfony (http://www.symfony-project.com)
CodeIgniter ( http://www.codeigniter.com)
CakePHP (http://www.cakephp.org)
And I have been exposed to these in python:
Turbogears (http://www.turbogears.com)
Django (http://www.djangoproject.com)
Pylons (http://www.pylonshq.com)
Currently, though, I involved myself in developing in Turbogears. As easy as it may seem, the problem with
This framework is the ORM is too simple. I don’t know I think it came to me when I think about using symfony project
that made refactoring to the model possible. Tried google-ing “Model Refactoring in Turbogears” but search almost
always comes irrelevant to what I was looking for.
Sincerely, there is no point in using ORMs if the logic of trimming extra data from your model still resides in the
controller. What happens, is, SQLAlchemy mainly becomes a database abstraction rather than an ORM. ( I see, hence mapper????)
I wish other developers would see it my way.
I am not against Turbogears. I like it. I love the way it handles things. I recently learned how to break down controller parts. The thing is
I am not used to using ORMs as database abstraction mechanisms. Might as well go with ADODB ;) ( hmmm at least I don’t have to code
SQL by hand) But that’s just IT! Naked Objects come to view. Every body is going down the way of minimalism. But just how far minimal
should one get? It doesn’t make sense anymore sometimes. People can really be difficult when it comes to decisions like this.
As for now, I will leave all my database queries in the controller, pass them to the view instead of doing the queries in the model, with the controller
being agnostic to what the model contains (WHICH SHOULD HAVE BEEN THE BETTER WAY).
And as far as I am concerned, both languages ARE FAST. It’s just up to the programmer just HOW FAST the software would be.
Good Morning.
Keep the tradition of knowledge sharing alive.
28.6.08
Excited
I am getting worked up with the new project that is coming. I think that this project should be worked from scratch to be able to dictate the flow of the processes involved. I will not divulge any information yet. You have to see this blog every now and then to be able to track what is happening.
Clue: (1) This project involves packages.
Don't wish us luck as it never really helps anyway, not REALLY.
Over and out.
Clue: (1) This project involves packages.
Don't wish us luck as it never really helps anyway, not REALLY.
Over and out.
26.6.08
Running Firefox 2 and 3 Simultaneously
Woot! Firefox 3 is out and it ain't beta.
Here's a neat way to run firefox 2 (if you haven't upgraded yet) and firefox 3 together:
1.) Install your new firefox in a different location, say C:\Firefox3
2.) Copy the file to, say, firefox3.exe and create a shortcut for that
3.) Modify the shortcut to your firefox 2 to read "firefox.exe" -no-remote
4.) Do the same thing for your firefox3.exe
5.) Create a new profile for both ( you have to add -ProfileManager to the shortcuts to access the profile manageer, duh!)
6.) Add the name of your profile to the two modified shortcuts
(i.e. C:\Firefox3\Firefox3.exe -no-remote -P Firefox3Profile AND C:\Firefox2\Firefox2.exe -no-remote -P Firefox2Profile)
7.) Shortcuts!!!
The thing is, you have to create the profiles so plugins from one firefox installation, does not appear to the other.
The only problem is, you have to reinstall all your plugins to the NEW firefox
19.5.08
Almost Done
Whew!
Have I got a hectic week or have I got a hectic week, and all of this painstaking work nearly comes to an end. I am really happy with all the modifications I have done to Joomla! 1.0.15.
The funny thing is, I am not able to document them all. But, I will be able to document it after. See, I found this link http://www.assembla.com. It made my work easier. It has (1) SVN + Trac (2) Wiki (3) Collaboration [though I don't have to collaborate with anyone].
You should try this site out.
Renz Out!
3.5.08
Labor day
Wow I'm back. For the past 2 days, I haven't been in front of the computer. I took a holiday from all the work-related things since that's what Labor Day is all about isn't it?
Anyway, back to documenting what I have done so far.
Here is the problem. In Joomla!, I want each page to be unique. I want it to load a different style (if I wanted to, of course).
The solution I came up with is to use the variable pageclass_sfx.
1.) I modified the file content.html.php from the com_content component of Joomla!. I took away all the instances where this variable is being added to some elements of the pages.
2.) Since it is all taken away from the pages, what I did is to put it as global variable. Why would I do this? Because I want to get this variable from the front-end side. and there is no other way of doing so.
3.) Since pageclass_sfx is part of the global scape, what I did was call separate stylesheets for the page for each pageclass_sfx value. I did this to the default template only. It's easier to do this from the default template than the assigned, but it is not impossible.
I don't know if there are other cleaner, more elegant ways to do this. However, for the sake of the site that I am doing now, I need this "modification" to be able to control everything.
Through this hack, I am able to create different "patterns" for the pages that need them and use the default template for the ones that don't need them.
Last week: Printer Drivers
I was able to make 2 out of the 3 non-working printers into working ones. All they needed was update in the printer definitions. It took me about 2 - 3 hours doing them. One was a HP Laser 1600 (Colored LaserJet Printer !!!), the other was a FujiXerox DocumentCenter 550i. (Trademarks for these printers are owned by their owner, not mine)
New Project
I am starting on a new project that computes Water Billing and Rentals. I will be using the CodeIgniter Framework. It will be easier that way. I already created a Library that will make it behave like symfony's view system. Although it's a little bit more complicated since in this view system, I can declare what the output will be (basically, it's glued to XML+XHTML 1.0 Strict). I will be uploading the library in a couple of days, once I tested that it's perfectly working and all that I needed is there.
Anyway, back to documenting what I have done so far.
Here is the problem. In Joomla!, I want each page to be unique. I want it to load a different style (if I wanted to, of course).
The solution I came up with is to use the variable pageclass_sfx.
1.) I modified the file content.html.php from the com_content component of Joomla!. I took away all the instances where this variable is being added to some elements of the pages.
2.) Since it is all taken away from the pages, what I did is to put it as global variable. Why would I do this? Because I want to get this variable from the front-end side. and there is no other way of doing so.
3.) Since pageclass_sfx is part of the global scape, what I did was call separate stylesheets for the page for each pageclass_sfx value. I did this to the default template only. It's easier to do this from the default template than the assigned, but it is not impossible.
I don't know if there are other cleaner, more elegant ways to do this. However, for the sake of the site that I am doing now, I need this "modification" to be able to control everything.
Through this hack, I am able to create different "patterns" for the pages that need them and use the default template for the ones that don't need them.
Last week: Printer Drivers
I was able to make 2 out of the 3 non-working printers into working ones. All they needed was update in the printer definitions. It took me about 2 - 3 hours doing them. One was a HP Laser 1600 (Colored LaserJet Printer !!!), the other was a FujiXerox DocumentCenter 550i. (Trademarks for these printers are owned by their owner, not mine)
New Project
I am starting on a new project that computes Water Billing and Rentals. I will be using the CodeIgniter Framework. It will be easier that way. I already created a Library that will make it behave like symfony's view system. Although it's a little bit more complicated since in this view system, I can declare what the output will be (basically, it's glued to XML+XHTML 1.0 Strict). I will be uploading the library in a couple of days, once I tested that it's perfectly working and all that I needed is there.
30.4.08
Another Joomla! wishlist
I am about to create another Joomla! hack. What I would like to have is to create a way to specify a template for each page that I am about to create.
An idea came to me to extend (yet again) joomla com_content component to include (at the backside) a way to "insert" another field, specifically a template field that will load the specific template or the default template if there is none specified.
Good luck for me on this "hack"
An idea came to me to extend (yet again) joomla com_content component to include (at the backside) a way to "insert" another field, specifically a template field that will load the specific template or the default template if there is none specified.
Good luck for me on this "hack"
Subscribe to:
Posts (Atom)