in reply to Re: RFC: Verify Interpreter and Language
in thread RFC: Verify Interpreter and Language
So back to your example. If I had no framework, I could create a module and various objects that work as validators on other objects. That would be a new framework, true. But it falls into the trap of being a validation language I can write code in. For this very reason, I'm not fond of many template languages and similar which allow raw code to be executed. Why would I ever wish to use DBI from this to validate my data as being of certain standards?
So for instance, sigil's are gone in my language for data types, since a scalar in perl terms is just a 1 element array in my language, where you just don't use the index. You have trinary compares for < and > for easy betweens. You have variables taht refer to the outter world as :someVar.
To put it in the frame of mind of an architecture. What I would do in the past, is use something like HTML::Template and CGI. I would take in all my inputs, create an object tree of things like User, Group, Message, Topic, Node, populate them with my data, and call various functions to validate each object in the object tree. Each object would be validated in the native language and returned.
But I run into a similar problem of replacing HTML::Template w/ here-docs. Yes, I can perform invalid syntax in either, and accomplish the same in either, but the here-doc method can be very powerful. Almost TOO powerful. If I'm smart and good and all, I can accomplish a pristine system w/ no issues of what is doing what. If I'm bad and/or not as smart, I can start doing DBI calls in places I'll be rendering templates. That scares me. It's the same issue of actually using php as your template language, or JSP as a coding language.
Heh, imagine if you wrote DB queries in perl instead of SQL.
The advantage I propose, is the same as HTML::Template, Class::DBI and Catalyst. I can have clear seperations of duty, that are done very well, and won't comingle. The template language only makes stuff well formated, where Class::DBI takes objects and stores/retrieves them for me, where as catalyst deals w/ URIs, what is called and the clear seperation of one thing from the next. With verify, I can start out w/ nothing, and fill in the validation w/o worrying about stepping on things like Class::DBI or HTML::Template.
BTW, mind you, I never said the underlying language /was/ perl, but even if it was, it is a very simple subset.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: RFC: Verify Interpreter and Language
by acid06 (Friar) on Feb 10, 2006 at 13:53 UTC | |
by exussum0 (Vicar) on Feb 10, 2006 at 16:13 UTC | |
|
Re^3: RFC: Verify Interpreter and Language
by bart (Canon) on Feb 10, 2006 at 16:34 UTC | |
by exussum0 (Vicar) on Feb 10, 2006 at 16:42 UTC |