When to use MEF [closed] - silverlight

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I tried Unity and MEF and plain old new. And I am a bit confused as to when exactly you need to use any of these "patterns". Why would I choose to use MEF or Unity if using new is simpler and satisfies my needs.
In other words, what needs justify the use of MEF or Unity?

MEF allows for isolation of subsystems within an application. This isolation is useful if you need to change subsystem implementations often, or even at runtime. MEF takes care of the details of loading the subsystems and wiring up all the providers to the appropriate consumers. It's a giant step forward toward the ideal of building an application by concatenating a set of self-contained modules that know nothing about each other.
A significant portion of the code in a traditional application is dedicated to simply gluing things together - glue code. MEF drastically reduces the need for glue code.
If you're just constructing an object so you can open a file or show a dialog, that's not what MEF is for. If you're wanting to write code that uses a generic xyz service but don't want to hard-code a dependency on vendor a or vendor b implementations, that might be a MEF candidate.

Related

Can a project adopt AngularJS as its template engine while being a non-MVC project? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I use Pure as the template engine for my current project. It is, however, rather minimal in terms of what it offers. I am in need for a template engine that allows "conditional statements". AngularJS is a candidate that I am interested in. I have been reading a lot about the MVC framework lately and it seems quite interesting. If I have the resources to spare later on, I would definitely want to try to apply AngularJS on my project. For now, I just want to use AngularJS's template engine without converting my project to MVC. Is this viable? If so, please suggest any good resources for me to learn its template language. Thanks.
You can choose to only use the template bit in angular, yes. Check the angular website for tutorials. It's quite straight forward.

Business rule in db or the previous layer [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In a system, where should the business logic be implemented?? Is it using PL/SQL blocks in the database or in its previous layer say java / .net?
I'm not wanting to be too unhelpful, but the business logic should be implemented in the business logic layer.
If you're actually asking where the business logic layer should be, then it really depends how you want to architect your system.
It sounds like (and I'll assume) that you are referring to the classic 3-tier architecture:
UI <--> Biz Logic <--> Database
This tells us that we should separate out UI code from business logic from database logic. Given your scenario this would imply that you should omit business logic from any blocks of PL/SQL code.

Best practices for creating both mouse and touch-oriented WPF application [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
There is a need to develop WPF application which will support both mouse and touch input. I'm looking for an approach that will enable maintaining single codebase and minimize pain to implement that. Some framework or build configuration maybe - something like Project Linker + preprocessor directives scenario that is used to multi-target both WPF and Silverlight platforms in single project. Thanks in advance.
edit
Sample scenario : application has control that allows user upload multiple photos onto server. File selection box supports drag'n'drop with mouse, also it has to support some gesture to add new files.
Check this Drag and Drop Library.

Is there a good tutorial for figuring out what a website is doing so your program can do the same thing? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there a good guide or tutorial for people who need to programmatically interact with dynamic websites? There's been a rash of Perl questions about that lately, and I haven't found a good resource to point people toward. I'm asking not because I need one but because I don't want to waste my time writing it if it already exists. Although I'm most interested in Perl, the extra tools and techniques are mostly the same.
Typically, I see see these problems in people's questions:
Handling, setting, and saving cookies
Finding and interacting with forms
Handling JavaScript inside your user-agent
especially things like onLoad, onSumbit, and Ajax
Using HTTP sniffer tools
Using Web developer plugins in interactive browsers
Interacting with DOM, screen scraping, etc.
If there's no good tutorial, I'll add it to my list of things to do (unless someone else wants to do it). Along the way, if you don't have a suggestion for an existing tutorial, please suggest the things that you think should be in a new one, including links, your favorite tools, and your own user-agent development experiences. I don't care about the particular language you use.
The best I've seen is a Defcon presentation video.
Look at perl library of libraries. Some html parsing libraries should be made for talking to dynamic websites.
Like:
http://metacpan.org/pod/HTML::DOM
But do you want to use web-browser enhanced by perl. Or perl stand alone app?

What are disadvantages of JavaFX and Silverlight? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
JavaFX is a new technology introduced by Sun. I would like to know what are the limitations and pitfalls of JavaFX and silverlight.........
The main problems I see with JavaFX are:
It is very immature technology. While everything, as others have noted, must have a start somewhere, JavaFX is very immature technology in a field that has several more mature competitors. That makes all the difference. Flex/AIR and Silverlight are out there already and in active use all over the place. To tackle an entrenched market you need tools that are far superior to what's out there, not just a little superior (if at all).
It is stacked on top of the rather large JRE. The JRE is available on every major platform (and many minor ones) but it is not ubiquitously installed. The same is true of Flex/AIR and Silverlight, of course, but Flash is a lighter-weight solution than the whole JRE+JavaFX and the latter is basically a default on the target platform anyway.
JavaFX is heavily reliant upon the huge infrastructure that surrounds Java. This is a strength, of course, given that if you need it there's a library for it somewhere, but it is also a weakness in that it involves even more bloat than the JRE+JavaFX and starts to introduce you to the wonderful world of JAR Hell.
The final reason to be wary of JavaFX: I prefer it to all of the other currently available RIA technology. (Yes, despite my critiques, I like it better.) If I like something, it is guaranteed to fail. Computing technology is positively littered with technologies I preferred over what was eventually chosen by the market. My liking something is a kiss of death for it.
One of those may not have been entirely serious....
Here is a description of JavaFX disadvantages taken from this website (which also gives JavaFX advantages as well)
JavaFX's lack of maturity is, at the moment, its weak point. For example, it is lacking a lot of JavaFX-native controls (for example, a tree control). Now, it is quite straight-forward to wrap Swing controls and subsequently use them in a JavaFX-project but it's obvious that that is a bit of a temporary measure. Sun has mentioned that they will address this issue in future versions.
Hope this helps.

Resources