[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
My early morning...
Hi,
I know we all very busy men.
Perhaps this is absolutely stupid thing. But...
Why would us don't create a new developing technology together?
It sounds as from some presentation. :)
All steps in old technology looks like usual programming,
but we have a lot of pages with code in different places
and sometimes it's very difficult to find out some code.
More convenient for us is developing some projects like usual in C or
Perl.
In that case we have for example the main file, header files and other
ones
with new objects or functions inside.
But major reason for doing this, I think, is what we have
1. HTML
2. MV-HTML language extension
3. Perl
4. JavaScript
5. ASP style coding
6. what next...?
inside our catalog.
And maybe we have to make a choice: Perl, MV_HTML( ASP style or old mv
style), or something other...
An example No. 1.( C, Perl or new ASP-like style)
# file main.mvs
# This a demo site
#include <defaults.mvh>
#include "demo.mvh"
#define SITE_NAME Demo
#define SITE_URL http://demo.somedom.com
#define SITE_ROOT /home/minivend/catalogs/demo
#define MAIL_ORDER_TO demo@somedom.com
# or
$ENCRYPTOR /usr/local/bin/pgpe
$new_text "We have a great news for you... :)"
...
main( "/pages/index.html")
{
$some_text="Hello World!!!";
$code_on_front_page="00-001";
html_title_write( "Demo site");
html_header_write( "");
html_write( <h1>$some_text</h1>);
[page $code_on_front_page]All you need is "this thing"[/page]
[news]
# or other way
news();
html_footer_write();
}
flypage( "/pages/flypage.html")
{
html_title_write( "Code No. [item-code]");
...
}
news( "/pages/news.html")
{
#include "header.mvh"
html_write( $news_text);
[other_function $par1 "par2" ]
# or in other way
other_function( $par1, "par2");
....
}
other_function()
{
$in_p = 0;
( $p1, $p2) = @_;
$in_p = $p1+$p2;
return $in_p;
}
report( "pages/ord/report.html")
{
html_write( <form action=[process-target]....);
# maybe OO style coding
html->write( "<input type=text name=$var_1 value="">);
...
# you can describe the file basket.mvs from Makefile.
[basket]
...
}
In that case there are two ways to creating a site.
1. make a Makefile-like file for creating, cleaning, generating the
catalog.
2. create a Perl program with same code as you can see above or use
same code as a command-line parameter and spawning additional process
for each catalog from parent
and which will be able to generate any html file for you with rules
described in the example or makes it on the fly.
I think it's also improve a catalog performance.
Excuse me for this really stupid letter, I can't resist myself. :)
And for my poor English too. :)
Thanks,
Good luck and have a nice day,
Alex