Is this idea possible?

hello ,

i’m thinking in make php script with new idea ,
my idea is to give this script ability to make php scripts automaticlly ,
i want give this script some properites to help me to build any php script in short time ! …
example :
if i want make php contact form , then i will tell this script some commands to build html form + php page for action which include action tasks …

my question is :
is this idea possible ? or it’s difficult to do it in php programming’s world ??

please share your opiniones with me :slight_smile:

You might want to have a look at http://framework.zend.com/manual/en/zend.codegenerator.html

hello ,

yes my idea is some similar to this , but i talk also about if conditions and all things which used in any php page …

My advice would be to have a look at the zend code and see if you can expand it further…

yeah but in general is this idea is possible in programming ? or no ?

is it possible logically ??or i must use command line which will give me more freedom to control of my code ? ,
i want your opinions :blush:

You can definitely do it. All you’re doing is generating text that follows a specific syntax. Code generation has been around a long time. You wouldn’t be the first to make a “php form builder” that handles the form submission and shows validation error messages and stuff… dreamweaver is a commercial software that sorta does this, and I know I’ve come across a few websites that let you pick what you want the form to have/do, and it spits out the php and html code.

What’s more common is a different approach. Instead of having something generate the code for them, they use specially designed code(usually libraries) that are very flexible and have lots of configuration options. Then, you just configure it, and make some small modifications to adapt it to what you need.

Depends on your needs. Both have the potential to be highly reusable in simple situations.

Is it possible to extend the Zend framework ? Very much so.

What you are suggesting, in your original question, is also possible. However, I would also suggest you begin with a framework. All frameworks, if not most, are expandable. You are only limited to your knowledge of the language.