I see work is still going on with new features on MEF (MEF Codeplex site) and they are shipping MEF 2 beta releases, however they do not have any decent documentation on what the new features are experimenting/exploring/building?
So, what are the new features (in a little bit of detail please, a sentance or two for each would be great) that are part of MEF 2?
I know one big feature is support for open generics. This allows us to import parts that look like this:
IRepository<T>
{
}
using an import that looks like this
[Import(typeof(IRepository<>))]
private IRepository<Users> userRepository;
From the preview documentation
Support for generic types.
Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
Multiple scopes.
Related
This question is about Options, a feature in Adobe's proprietary language HTL:
https://helpx.adobe.com/experience-manager/htl/using/expression-language.html
Expression Option Sightly
My simple question: Can I extend HTL by implementing my own custom Options? If so, how?
Yes, you can implement your own custom options for an HTL expression. You will need to implement a Filter and add it to the compiler.
But you shouldn't, as:
This is not a designed extension point. You will need to fork the implementation and modify it, thus becoming responsible for keeping it up-to-date further down the road.
You can most probably get the same results by using the public APIs (such as https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md#221-use).
In case you think there's a very good reason for adding or modifying expression options, you can propose an HTL specification change (and also contribute the implementation in Sling).
No. To implement custom options you will have to extend the respective plugin that supports that expression. those classes are not exported by sightly scripting compiler bundle and are not available to be customized.
I would like to create my own metamodel by extending a third party EMF meta model. Currently I am using a third party ecore-model and would like to add an extra attribute to a specific EClass. I cannot change the existing metamodel due to the opensource license agreement. I have searched internet for the solutions, but failed to find any. Any help will be appreciated.
You can take a look to the EMF-Facet project:
https://www.eclipse.org/facet/
...EMF Facet proposes a solution to extend existing Ecore metamodels without having to modify them. The idea is to provide non-intrusive mechanisms to add new features (types, attributes, operations and references) to a metamodel...
I'm not sure that exactly what you are searching for, but perhaps it can give your ideas or pointers to others technologies.
I am new to this and still trying to get a feel for the best way to do things with MVVM. I can't find an answer with Google.
For convenience, I have created extensions on multiple custom classes, e.g.,
public static AppointmentLabel ToLabel(this textblockPatient tbp)
{
return tbp.appointmentlabel;
}
In my MVVM model, I have placed these extensions in the Model as they seem to convert one source of information into another. However, some of the custom classes are UserControls and live in the View. Doing it this way would require the Model to "know" something about the View, as the above textblockPatient is a UserControl.
How is this done within a MVVM pattern? Are extensions considered to be an exception to the pattern?
Thanks for any help.
In my opinion this is not a mvvm related thing. I would suggest that you put your extension classes near to the classes they extend. By doing it so you reach some level of cohesion. Sometimes it make sense to put the extensions in a seperate project. For example if you know you want need that extensions all the time and you want to have a small codebase or faster compile time.
EDIT
contacted the author of play-js-validation. Bleeding edge stuff; Play has to be compiled against scala virtualized on to-be-released 2.10, and nested case classes are not yet supported. Really impressive project, I hope it comes to fruition as the prototype does almost exactly what I was hoping for...
Found this:
https://github.com/namin/play-js-validation
Anyone know if there are plans for built-in client-side validation in Play 2.0?
I am currently generating controller, model (with form validation), and dao scala files based on an existing DB schema; would love to include client-side validation as part of that process!
Thanks for clues, insider knowledge, etc.
p.s. Play user group is, to say the least, busy; most posts seem to be completely ignored (of course, many Stackoverflow Play-related questions go unanswered as well, so this thread may be DOA...)
There's no such plans I'm afraid, at least didn't hear about (note: I'm not a dev team member, just Player)
Check tickets on Play's Lighthouse
On the other hand I doubt if this fits Play's assumptions at all. Client-side validation is done with some external JS solution which should not be determined by framework, nobody said that it should use ie. jQuery by default.
Finally, the only thing to use client-side validation is just to include the JS libs and add proper attributes to your form fields, ie it will create tag that you can validate with jQuery Validation plugin:
#inputText(entrantForm("identitynumber"),
'_label->"Identity number",
'class -> "required",
'minlength -> "11",
'maxlength -> "11")
I want to start a project using the Scala language. While searching for web frameworks I've found Lift. However, it is not what I was looking for: a web framework that has complete separation of HTML and code. Lift does have some nice features (and a learning curve) but we need to have complete separation of HTML and code. I was hoping to find something like Wicket, Tapestry or Barracuda for the Scala language.
Although it is nice to be able to reuse html templates, it is more important to us to have the HTML templates work as a "static application" mockup. In Tapestry we can just put links in the static templates and use that to have static navigation and a sort of prototype of the application.
So, do you know of any other web framework that is easy to work with the Scala language?
Thanks,
Luis
Here it is I can understand why you might want it pure Scala, but you haven't stated that's necessary, and with the techniques defined within the blog post, and there is another blog which also helps, you should be able to get it close enough to what you desire.
Tapestry 5 has many similarities with Wicket and works very well with Scala. I haven't tried it myself, but Francois Armand has being doing it for some time and he's writing about in in his blog.
Try Context. It is a component based framework written in Java but I have used it with Scala without much difficulties.
Context uses XSL as templating language which forces a sharp separation between logical presentation (DOM-tree) and actual presentation (HTML/CSS/JS).
You can even, with little effort, create prototypes and mocked views by faking the DOM-tree and trying invidual components in different combinations.