From: Alex B. <en...@tu...> - 2001-05-24 16:49:21
|
> I asked Andrei here (PHP core developer) about this speed issue. He > seems to think that echo should be marginally faster than breaking in > and out of the HTML inline. He thinks this example is too short for a > fair speed test (probably some state switching setup on the first time > that won't happen on subsequent switches?), an atypical scenario. This > is an extremely marginal difference, hardly a concern. this is what I thought, that breaking, i.e. ?> <html> <? does take a _tiny_ bit more time, but it is so small as to be negligible. there's probably a similar difference between: echo "text"; and echo 'text'; (one is interpreted, the other is not) --- _alex -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Curtis C. <c_c...@ya...> - 2001-05-25 05:50:59
|
This may be a little off-topic, but when is the best time to validate user input, and what is the best way to do it? Say there is an html form which takes user input, I imagine the data should be checked as soon as the user submits the form, but what is the best way to check that data? I've been using regular expressions so far. Will some kind of class for validating user input be included in binarycloud, or is it too dependent on the specific application? Just fishing for some advice. Thanks, Curtis. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: alex b. <en...@tu...> - 2001-05-25 06:27:07
|
> This may be a little off-topic, but when is the best > time to validate user input, and what is the best way > to do it? > > Say there is an html form which takes user input, I > imagine the data should be checked as soon as the user > submits the form, but what is the best way to check > that data? I've been using regular expressions so far. > > Will some kind of class for validating user input be > included in binarycloud, or is it too dependent on the > specific application? Ah, this is good stuff. the way it works with binarycloud r1, if you use formBuilder, is you declare inputs, with 'simple types' like "this is text" "this is an email address" etc which are checked with regex. that works fairly well, but there are problems associated with doing the validation that "high up" in the application. in binarycloud r2, because all data I/O is through the entitymanager, we check it there. that's 10x better for a number of reasons: -the same exact code is used to check _all_ incoming data, including xml posts, html form posts, etc. -the same rules are associated with all data I/O -FormBuilder can be pretty dumb - this is great because it means you will have central control over all of your errors, so you don't ever have to write an error more than once, and it can be used in xml responses the same as it is used in html forms. so the idea with form builder, is it builds an XML profile of a form, based on a form definition or just a default entity profile. we then run that xml through an xsl to get html. when the user submits data, formbuilder attempts to take that data and do an Add() / Edit() operation for that entity. If the operation is successful, formbuilder outputs the "success" xml, and the xslt handles it. If there is an error, formbuilder re-builds the xml profile of the form, but with errors inline... and again, the xslt is responsible for turning that xml form definition into an html layout - in this case, a layout with all the user's data in it, and a few highlighted fields, maybe some instructions. so the answer is, do your validation at the data i/o level, it's clean, central, and prevents you from ever having to unnecessarily replicate logic. _alex > Just fishing for some advice. > > Thanks, > Curtis. > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Andreas A. <a.a...@th...> - 2001-05-25 09:54:51
|
Hi, --pedantic --march mybrain just had a look over binarycloud.php. Are the varibles ($path, $path_from_base, etc.) used in other scripts or are they just 'internal' to set the BC_PATH constant? If so, it would be clean to unset them when done: define('BC_PATH',$path); unset($cd_up, $path_from_base, $pieces, $count, $path); --lax cu Andi |
From: Alex B. <en...@tu...> - 2001-05-25 17:45:48
|
this was done in cvs shortly after I released the last shell. good that you're paying attention though :) _a > Hi, > > --pedantic --march mybrain > > just had a look over binarycloud.php. Are the varibles ($path, > $path_from_base, etc.) used in other scripts or are they just 'internal' to > set the BC_PATH constant? If so, it would be clean to unset them when done: > > define('BC_PATH',$path); > unset($cd_up, $path_from_base, $pieces, $count, $path); > > --lax > > cu > Andi > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: Alex B. <en...@tu...> - 2001-05-24 16:47:17
|
> Well according to the article at > http://www.newbienetwork.net/sections.php?op=viewarticle&artid=15 tests > have shown inline HTML to be twice as fast as using echo(). No results > given to back it up though... hehe, further evidence that bad style = bad code :) _a -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |
From: W.D.Sumilang <wa...@on...> - 2001-05-24 00:30:29
|
>actually, this win32 stuff beings up an interesting point.... later on >you'll start to see some fairly "deep" integration of the whole process with >makefiles, and those makefiles will be php, intended for use from a command >line. >does anyone have any experience using php scripts from a dos command line? Sorry, haven't tried this. >I'm sure its possible, but it's probably a little strange. >and along those lines, a number of the tools we have and will provide are >quite *nix specific (shell scripts, etc). >what are people's thoughts on this? Personally, I just haven't had enough time to put together a local *nix system for testing, but using linux for production... win95 is just something I've inherited locally... so it's not an issue for me... -W.D. __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com |
From: Jimmy H. <ji...@ha...> - 2001-07-08 07:15:56
|
Hi after finally having a win on my freebsd make system, now I move on to the more exciting part.... Under r2/binarycloud/ there are base build ext user Which one should I work on and which one should I not touch? Any hint for *first* time *newbie* on what to do to create a page, template, and an admin area? How about database connection etc? Where do I go? Thanks for the hints. Regards, Jimmy |
From: alex b. <en...@tu...> - 2001-07-08 18:02:04
|
> Under r2/binarycloud/ there are > base > build > ext > user user/ is where to go. > Which one should I work on and which one should I not touch? > Any hint for *first* time *newbie* on what to do to create a page, have a look at user/mod/hello_world/HelloWorld.php if you create a new module, you'll need to add it to a page definition, take a look at user/htdocs/index.php > template, and an admin area? How about database connection etc? Where do Template: look at user/tmpl/html/masters/example.php -- Database connection: not yet. We haven't really integrated metabase or the QueryManager, so while it is certainly possible if you are willing to do a little foo with metabase setup. _alex |
From: Jimmy H. <ji...@ha...> - 2001-07-08 23:35:09
|
So once I changed user/ then do a make, then don't touch the stuff in build/, simply copy the htdoc/ in build into apache docroot for the virtualhost ? What if I want to make two sites... Should I make a copy of user/ ? BTW Alex, I have a simple patch to get the "make" works in freebsd... Anybody wants it? |
From: alex b. <en...@tu...> - 2001-07-09 00:25:36
|
> So once I changed user/ then do a make, then don't touch the stuff in > build/, simply copy the htdoc/ in build into apache docroot for the > virtualhost ? Everything in build is derived, don't do development there. > What if I want to make two sites... Should I make a copy of user/ ? At the moment we don't do multiple sites, you'll have to copy the source tree wholesale. That will change. Also, I find it most convenient to run a symlink to each build: htdocs/whatever/ -> /path/to/binarycloud/build/en/htdocs/ > BTW Alex, I have a simple patch to get the "make" works in freebsd... > Anybody wants it? Can you create a diff and send it to the list? thanks! _alex |
From: Jimmy H. <ji...@ha...> - 2001-07-09 00:37:25
|
Diffs for FreeBSD |
From: TAO R. <ron...@ho...> - 2001-05-24 03:26:29
|
>hi ronald, > >thanks for the code, I've tested it on linux, it doesn't interfere, >committed it. > >you're in CREDITS now :) > >_alex hi alex, you know, my patch is only work on Apache Win32, I will make it work with IIS and PWS as well today. Ronald TAO ron...@ho... _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
From: alex b. <en...@tu...> - 2001-05-24 04:03:43
|
great! > you know, my patch is only work on Apache Win32, I will make it work with > IIS and PWS as well today. > > Ronald TAO > ron...@ho... |
From: Alex B. <en...@tu...> - 2001-05-23 18:39:52
|
>> if anyone has any problems, let me know. > there is a bug in binarycloud.php with Win32, and I have attacted the > patched version. > > Ronald TAO > ron...@ho... hi ronald, thanks for the code, I've tested it on linux, it doesn't interfere, committed it. you're in CREDITS now :) _alex -- alex black, ceo en...@tu... the turing studio, inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 |