Which framework first use view first pattern - lift

I am a scalaer, currently using the Lift framework. Lift uses the view first pattern and I would like to know from which framework did this pattern originate?

Per the wikipedia entry the pattern is based on the one used in Wicket.

Related

In BPMN - how to model interface with details (fields) between two components?

I've been wondering how to model interface between two components using it's rectangular representation (not lollipop) with all the details (attributes, operations).
I have two components and interface that lets them to "talk" to each other.
Using "lollipop" notation I would do this in this way:
But I didn't know how to attach my interface definition to this flow.
Is it correct to attach it to the line of Information Flow? What type of assotiation use to do this?
I found in OMG specifiaction the following description.
The component providing the interface REALIZE it. The one that consume it - USES it.
Recreating the diagram gave me this state:

Non-capturing wildcards in Play Framework routes

I'm exposing an HTTP API through Play, and in order to manage compatibility-breaking changes, the URL contains the version number. At present this looks like the following:
GET /api/v1/someMethod com.foo.Api.someMethod()
As I introduce a change to the output of one of the methods, I'd like to support v2. For most of the methods though, the behaviour is identical, so I don't care which version is used. I tried to modify the above line to:
GET /api/v:version/someMethod com.foo.Api.someMethod()
But Play fails to compile this, with the error Missing parameter in call definition: version.
I know I didn't use the version parameter in the call - because I didn't need to! Is there a sensible way to achieve what I'm after here, either to get Play to skip this check, or to put a wildcard in the route that is not captured as a parameter?
(I suppose if not I could add the parameter to the method definition, and then ignore it. But I'd rather avoid that if possible.)
Having played around with this for a while trying to find workarounds, I suspect it may not be possible.
The big sticking point is reverse routing. Play wants it to be possible for me to be able to use #routes.com.foo.Api.someMethod in my templates, and have it resolved to the URL that would invoke that method. (And in fact I do this in my API docs). If either of my above proposals were to be accepted, it would be arbitrary what the actual URL was that corresponded to the method.
I suppose what I really want is for the method to have a canonical URL, but for other similar patterns to be considered a match too. I accept that Play does not offer this as part of the relatively simple routes file syntax, and I'd have to accomplish it myself (e.g. by using two patterns, with the wildcard one ultimately but not directly invoking the same method).

Does ZF have a filter for nl2br?

Does Zend Framework have a nl2br filter? I can't see it - am I just missing it?
I imagine I could do the same thing with PregReplace...
When we have an existing PHP function nl2br it really begs the question: "do we really need to wrap a ZF filter class around a function?"
There are a few filters that actually do that.
In terms of forms for injecting a filter (and maybe other cases) I would say yes or when we need some more flexibility with additional options; basically extending the PHP function. I don't really see a need for this particular function and you should be fine to simply use PHP out of the box.
No, Zend Framework dos't have nl2br filter. If you want to use it then you should put it in your code where you want.
You can use any other methods also similar to that for achieving this.

Has anyone implement DITA 1.2 Subject scheme in their work?

I would like to know if there is anyone who has implemented the subjectscheme maps of DITA1.2 in their work? If yes, can you please break-up the example to show:
how to do it?
when not to use it?
I am aware of the theory behind it, but I am yet to implement the same and I wanted to know if there are things I must keep in mind during the planning and implementation phase.
An example is here:
How to use DITA subjectSchemes?
The DITA 1.2 spec also has a good example (3.1.5.1.1).
What you can currently do with subject scheme maps is:
define a taxonomy
bind the taxonomy to a profiling or flagging attribute, so that it the attribute only takes a value that you have defined
filter or flag elements that have a defined value with a DITAVAL file.
Advantage 1: Since you have a taxonomy, filtering a parent value also filters its children, which is convenient.
Advantage 2: You can fully define and thus control the list of values, which prevents tag bloat.
Advantage 3: You can reuse the subject scheme map in many topic maps, in the usual modular DITA way, so you can apply the same taxonomies anywhere.
These appear to be the main uses for a subject scheme map at present.
The only disadvantages I have found is that I can think of other hypothetical uses for subject scheme maps such as faceted browsing, but I don't think any implementation exists. The DITA-OT doesn't have anything like that yet anyway.

(How) can I provide a custom class to set up pages in Wicket?

I would like to change the way Wicket instantiates my Page instance for a subset of URLs. Normally, I would map a class to a URL with mount(), in which case Wicket chooses one of the available constructors on that class and instantiates it.
A part of my application are simple CRUD operations that have a lot in common between different entity types. I have factored out the common aspects into some factory and helper classes and now I'm left with a class hierarchy for my pages which looks like this:
TemplatePage
|
AbstractEntityPage
| |
AbstractVenuePage AbstractEventPage
| | | |
ViewVenuePage EditVenuePage ViewEventPage EditEventPage
I would like to cut the last two levels, because the hierarchy starts to sprawl as more entity types are added and there's very little code left in those classes which could be factored out easily to more generic objects.
It's rather easy to transform AbstractEntityPage into a class EntityPage that gets specific components plugged in place as needed. I would normally use a Builder to do this, but I'm not sure how I would tell Wicket to use it? I couldn't find a hook for that in the API docs.
You can replace the default IPageFactory with org.apache.wicket.settings.ISessionSettings.setPageFactory(IPageFactory) and use different strategy of instantiating the page if it is special one.
You could use an EntityPage and implement the differences within your panels, but then you'd need a lot of similar panels (or a few generic panels if they don't really differ). Or you could take a look at one of the rapid prototyping libraries for wicket like wicketopia. I wouldn't consider any of them (the ones I found and tested) to be production-ready but they can be salvaged for ideas g.