I hope I don't wander too far off-topic here as I wend my way to the
question at the end of this post ("would it be useful to look at
something like the OWL/SWRL web ontology and rule languages for
liftweb?").

I tend to generalize/abstract a lot - so if anyone with a theoretical
bent is willing to peruse the following, I would appreciate any
feedback as to whether it could be applicable to liftweb.

Basically I just want to wonder out loud here whether support in
liftweb for some of the specific ideas referenced in this thread
(particularly the "keeping the meaning with the bytes" thing) could be
helped along by looking at some possibly related theoretical work
being done involving contexts and policies for web services, eg here:

http://www.csee.umbc.edu/swpw/papers/
PDF! - http://www.csee.umbc.edu/swpw/papers/denker.pdf

Some of this admittedly "theoretical" work from this particular
conference is being implemented in machine-executable languages (eg,
Maude) which are also fortunately quite close to Scala, thanks to
Scala's support for both the functional and the object-oriented
programming paradigms. (Maude is similar to Haskell and ML, which are
sometimes also compared to Scala.)

This means that it might be quite straightforward to map any needed
portions of this related theoretical work on policies and contexts for
web services from languages such as Maude to liftweb in a fairly
straightforward manner.


((Full disclosure: Maude is one of the few languages I know and use,
eg for conceptual data modeling of entity-relationship databases:

http://www.springerlink.com/content/35gxk6g83vn6q648/

I mention this mainly to show that although I'm still a relative
newbie when it comes to web frameworks - particularly regarding
security - I do have some background in specification of databases
with contraints which I hope could somehow be applicable to database-
oriented programming in liftweb.))


I was intrigued by the 2006 post by DP mentioned upthread:

http://blog.lostlake.org/index.php?/archives/19-Keeping-the-meaning-with-the-bytes.html

where he suggests some excellent web framework design principles:

- "The semantic meaning of fields on objects should be retained
throughout the field's life."

- "Conversion to a semantic-free format (String, double, etc.) should
be done as late in the field's life-cycle (e.g., a String returned
from 'render as HTML') as possible."

- "Every field of every object {should} be semantically meaningful."

- - "getSSN() returns an object of SSN class that derives from
Taxpayer class that derives from SensitiveIndentifyingInformation
class."

- - "the toHtml() method on the SSN class returns '***-**-****' unless
the context in which the SSN is being accessed has permissions /
grants permissions to see more."

- "All pieces of the object are defined in a central place."


It would just seem that the above-postulated "central place" could be
(built using some of the rich facilities provided by) Scala's type
system itself - perhaps even neatly packaged into a kind of "liftweb
MOP" (meta object protocol, like CLOS added to Lisp), or presented as
a DSL (domain-specific language).


The road from design-time to run-time is of course a sequence of
stages where abstraction is concretized and type info is erased - as
we move from an SSN, to a String, and eventually to a bunch of pixels
on the screen.

I would think that the line could be drawn so that the web framework
always "knows" that something is an SSN. I don't know enough about
JVMs to understand if or when this kind of "type info" is eventually
"erased" - but I understand that it's important that a level of
abstraction should be provided to the end-programmer using a web
framework where this type info is always available, enabling centrally
specified policies to make the web app just "do the right thing"
depending on the particular context.


Coming back to the problem of providing a completely general framework
for specifying policies and contexts: Would any of the theoretical
papers from, say, this conference:

http://www.csee.umbc.edu/swpw/papers/

provide any useful pointers as to how to approach this?

I'm not sure if the implementation languages there seem too ivory-
tower, or the conceptual languages there sound too "designed by
committee" (eg, OWL/SWRL), in the eyes of liftweb committers and
programmers who might be quite understandably up to their necks in
hands-on issues like cross-site scripting attacks etc. But formal,
theoretical stuff can have its place, since:

(a) Scala itself is based on a rigorous theoretical, formal foundation

(b) tools supporting checking of programs written in commercial/
industrial languages (eg, Erlang) are now being written in formal/
academic languages (eg, Maude):

(WARNING - PS file!) 
http://www-i2.informatik.rwth-aachen.de/old/Staff/Current/neuhaeusser/publications/wrla06.ps


And Scala's fuctional/object-oriented paradigms and very rich type
system (making Scala very close to many formal/academic languages)
could make it straightforward to map code and concepts from some of
these languages and systems to Scala and liftweb.

For example, one of these papers:

PDF!  http://www.csee.umbc.edu/swpw/papers/denker.pdf
"Towards Integrated Specification and Analysis of Machine-Readable
Policies Using Maude" by Rukman Senanayake, Grit Denker and Jon Pearce

uses the executable specification language Maude (which, like Scala,
supports both functional and object-oriented programming paradigms,
pattern matching, type parameterization, per-operator user-definable
evaluation strategies, and reflection) to provide an executable
specification for an example of a web service which processes returns
for Amazon.

Would it be useful to look at stuff like the "OWL-S" process model and
"OWL/SWRL" web ontology and rule languages used in the above paper, as
a point of reference for providing a more general set of facilities
for dealing with policies and contexts in liftweb?



On Oct 6, 1:50 pm, "Oleg G." <ojo...@gmail.com> wrote:
> Thanks for all the answers and especially for David's clarification.
> It would be really cool to upgrade the 'keeping the meaning with the
> bytes' thing (http://blog.lostlake.org/index.php?/archives/19-Keeping-
> the-meaning-with-the-bytes.html) to allow extension/customization.
>
>
>
> > Generally, yes.  I haven't dived into the reflection-based layout or the
> > Scala-related reflection stuff in 2.8 deeply enough to say that we could do
> > a val-based Record implementation.
>
> > > Is there any reason (other than time constraints) to not update the Record
> > > framework to take advantage of the newer language features?
>
> > > Tim
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to