I'm looking for an actual implementation of StackForm recommendation. It can be a framework, API or any light-weight, Compact Framework-compatible library.
It's not too complex to implement that idea, and I did in the past a couple of times, but I'm friend of not re-inventing wheels and maybe someone or group did an open sourced project implenting a generic navigation manager in order to create Compact Framework Forms application using this approach or any other similar to it.
FormStack explained on MSDN:
http://msdn.microsoft.com/en-us/library/aa446546.aspx#netcfuiframework_topic5
Thank you in advance.
I rewrote the MSDN Form Stack (originally written in 2003) in 2009 using an IoC container. Here's the blog entry. Not sure what else you're after - both examples provide a basic and generic mechanism for Form navigation.
Related
My background is more in C#/.Net, and have now been offered to move to Intersystems Cache. I haven't found any recent posts on this so unless I missed something here goes:
From what I understand Cache has some mapping for ADO.NET/.NET, but is there something out there so I can use Cache for the DAL and C# for the BL/front end (like ASP.NET MVC)?
Is there a port somewhat similar to Xamarin, that allows one to write everything in C#, using Visual Studio?
I haven't started with Cache yet, but from a brief glimpse it looks somewhat similar to C# being string based and slightly similar approach to interfaces and implementation.
Thanks
Simply put: no.
However, you can use the provided DLL (InterSystems.Data.CacheClient.dll) and the reference (InterSystems.Data.CacheClient) to establish an ado connection to cache. From there you can use SQL to get your data or call a stored procedure from cache. (I'm still researching myself.)
Here's a little tutorial for a c# front-end. (a bit old though, like cache)
http://www.windowsdevcenter.com/pub/a/windows/2006/03/28/oop-c-meets-cache.html?page=1
And some documentation: (this really helped me out)
http://docs.intersystems.com/documentation/cache/20131/pdfs/GBMP.pdf
Good luck and happy coding!
Yea, this is a late response, but here's something that may help, if you're still interested.
I remember back in 2009, Intersystems came out with a .Net Gateway where the Cache developer would create a DLL for you to use to call the different routines and globals. I think that has since been kaput. So I gave up and went with a linked server (static table created by a routine's nightly build) in MS SQL.
Recent searching led me to a link to a framework which I am currently looking into. I haven't tested it yet, but it is a "LinQ API to work with Caché Globals from .NET Entity Framwork"
You may also want to take a look at Caché eXTreme and the samples provided. I'm hoping to implement one of the two (or both) in order to complete a project I'm working on.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Which .NET Dependency Injection frameworks are worth looking into?
Hi,
As a new kid in the C#/.NET block just moved in from Java neighbourhood, I am looking for options in Dependency Injection/IoC frameworks for .NET/C#.
From Scott Hanselman's blog post few years ago I got a fairly long list of DI frameworks, but there was really not enough information to go with beyond the list itself (plus a license and a version number) to make any semi-intelligent choice. Nor have I developed a ghestalt of the relative popularity (and thus the community support available) for any of these. And the list itself dates from 2008, which makes it a bit outdated, so I would like to ask kindly SO community for help on this matter.
Please list (or vote for) your favourite DI framework, adding a link to framework official website and please be so kind as to provide some reasoning for helping me and others developers like me to make a choice.
A code sample snippets for declaring and injecting dependencies would be of great help as well.
NB: Please restrict yourselves to one entry per response please, to keep it simple and objective.
I have used Ninject before and got on well with it. There are code samples on the front page of the website.
http://ninject.org/
Edit:
Ninject also supports MVC
Of those I have tried, I like Unity best by far. Easy to use, and feature rich. A note is that it's not supported if you are developing for Windows Phone 7.
Of the list I've tried Unity, StructureMap and Autofac.
I perfer StructureMap, I think it's the most straightforward and easiest to use. (didn't spend much time with Autofac tho since was just messing in my own time)
You could also use MEF, but be aware that MEF is not only for this purpose. Mostly MEF is a little oversized for normal DI scenarios, but very usefull if you intent to develop a extendible app.
I want to learn “C#” and “.net frame work” properly.
I read basic concept of C# language. Since I know C++ It did not took too much time to read C# simple tutorial.
Now when I searched the .net tutorial, most of the sites give C# language feature and some of the .net controls API and class usage.
But I don’t want that. I want basic such as how event loop work, how frame work is designed and some core concepts. For example when I searched the memory handling in .net I got garbage collection in .net, I read it and liked it a lot because it explains how and when garbage collection is going to take place.
One more thing is how read/understand a frame work?
Please help me to understand C#.net frame work properly.
Buy the book: CLR via C#, by Jeffrey Richter
I make a habit of reading someone else's code for at least 30 minutes a day. Code rarely comes with explanations fit for beginners, but it sure helps to get an understanding of practical usage of the language.
When looking for a text-book-style language guide, the MCTS self-help books have been more than adequate for my needs. They hardly cover practical usage of the language, but are fairly thorough in the whys and wherefores.
Here's a link to the MS MCTS training site, where you can explore certification exams and find supporting literature. I hope it helps.
http://www.microsoft.com/learning/en/us/certification/mcts.aspx
First of all, there are two completely separate GUI frameworks contained in .NET. The older one is called Windows Forms or WinForms and is largely a wrapper around the low-level Windows API and Windows native controls. The other one is called Windows Presentation Foundation (WPF) and is a very new and very different approach.
How the event loop works: The event loop is normally referred to as the message loop. There is a separate implementation of it in Windows Presentation Forms (WPF), about which I could find no information (sorry). But the WinForms one is actually the same as you would use in a low-level Windows API application. There is a Wikipedia article on the Message loop in Microsoft Windows.
How the framework is designed: This is a very vague question and is not possible to be answered as such. If you have specific questions about the design criteria or the design process, you can post a new and specific question about it.
you dont have to stack in books, first off find a Reflector program and try to understand codes
I'm starting a new project which would greatly benefit from program add-ons. The program in its most basic form reads data from a serial port and parses it into database records. Examples of add-ons that could be written would be an auto-archive add-on, an add-on to filter records, etc. I'm writing both the program and the add-ons, but some customers need custom solutions, so instead of branching off and making a completely separate program, add-ons would be great. The simplest add-on would probably be a form who's constructor takes an object reference, manipulates the object in some way, then closes.
Unfortunately, I have absolutely no idea where to start coding, and almost as little idea where to search. Everything I search for turns up browser add-ons. From what I have gathered, I need to look into dynamic loading DLLs. Besides that, I'm clueless. Does anyone have any good resources or examples I that they know of?
I'm happy to provide more details, but this project is in its inception, so I don't have a ton of specific details (specifics kind of defeats the point of add-ons, too.)
You should seriously consider using the Managed Extensibility Framework (MEF) to handle your plugin architecture. It requires thinking about things a little differently, but it is well worth the mind-stretch.
This is a simple example to illustrate the basic technique.
codeproject.com - Plugin Architecture using C#
This article demonstrates to you how
to incorporate ... as a
plugin for another application or use
it as a standalone application.
in .NET 4 you now have the Managed Extensibility Framework (MEF) to do much of the plumbing.
In .NET 3.5 you had the System.AddIn but it was deemed by many to be far too complex.
codeproject.com - AddIn Enabled Applications with System.AddIn
AddIns (sometimes called Plugins) are
seperately compiled components that an
application can locate, load and make
use of at runtime (dynamically). An
application that has been designed to
use AddIns can be enhanced (by
developing more AddIns) without the
need for the orginal application to be
modified or recompiled and tested
You really need to look at Managed Extensibility Framework (MEF). This is specifically designed to help support add-ons and other extensibility.
A very basic description (basically, your plugins must implement a special interface):
http://martinfowler.com/eaaCatalog/plugin.html
Much better article, in C#:
http://www.drdobbs.com/184403942;jsessionid=TVLM2PGYFZZB1QE1GHPCKHWATMY32JVN
I think Reflection will play a major role.
I expirimented with an app that had a plugin folder. A filesystem watcher would watch the folder, and when a new DLL was placed in it, it would use reflection to determine which types of plugins it included, loaded them, and added them to the list of available classes, etc.
Try using the term 'add-in' or 'plug-in' for your research instead of 'add-on'. That should help some.
If you're using .Net 4, there's an add-in namespace in the framework that will get you partway there.
Writing plug-in support for an app is no simple task. You'll have to maintain pretty strict separation-of-concerns across your interfaces, you'll need to provide an interop library that defines ALL of the supported plug-in types, and you'll want to do some research into dependency injection & inversion of control, in addition to the previously-suggested reflection research.
It sounds like you might have a busy weekend doing research.
Many popular applications such as Wordpress, WHMCS and the majority of PHP forums allow plugins to hook into core application events (such as registration, logging in, create post etc.) by simply specifying a function with a particular name.
I understand that these applications are not pre compiled, but is it possible to do something of the sort with C#? I've looked into event handlers, but it seems that you can only accomplish this if the plugin has the ability to instantiate the class that we want to hook into (or at least thats what searching has lead me to believe)
Ideally, these hooks would be into business layer class events/methods and can be hooked into by multiple objects, so it would function in either WinForms or ASP.NET MVC.
Given Alex's answer, this should be useful:
System.AddIn Tools and Samples
http://clraddins.codeplex.com/
If you design your application for extensibility, this is easy. The Managed Extensibility Framework is designed for exactly this sort of scenario, and makes it very easy.
It will be included as part of the core framework in .NET 4, but is downloadable now for use in 3.5.
There is an AddIn framework shipping with .NET 3.5. The framework provides very powerful mechanisms to expose interfaces by a host application and to manage, dynamically load-unload addins etc.
Why the core concept that comes up to my mind first, is Dependency Injection? I haven't ever played with a plug-in system in any app of mine. Does DI could help anyhow with that??
Specifics on our senerio would be helpful, but generally, You may want to explore the provider psttern.
There are 3 components:
- An abstraction of a piece of functionality, (Interface/baseClass)
- A Factory method that looks to config to determine what type of Class to create
- [your] Custom Class which extends/implements the abstraction. for example, a Membership provider class that hits a custom dasta source for user info.
This is very useful when switching out logic. If you want to create an app with swappble UI components, it is another story.
There is support for this in ASP.NET, starting with 2.0.
More info on the provider:
http://msdn.microsoft.com/en-us/library/ms972319.aspx