ORM Mapping software replacement [closed] - sql-server

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.
We have a large web application that uses multiple databases (all currently MS SQL Server 2008 R2). This application is around 7 years old and was built around the EntitySpaces framework. It's currently using version 2009 of this framework, written using .NET in C# and targetting .NET 3.5
Now that ES is no longer around we have a need to change this to something else and are having problems deciding what to use.
Our database schema is very mature and works perfectly for us. The application is installed in over 80 sites across the UK.
Ideally we'd like a similar ORM tool that we can just point to the existing database schemas and generate our business and data acess layer classes. We don't mind about updating to a higher .NET framework if necessarry.
Our application makes use of both the Entityspaces objects and also call some stored procedures to provide reporting functions. This is something we cannot change so the ability to call parameterised stored procs is essential.
My question is - Has anyone had any experience of doing this and can anyone recommend any tools to use to try out?
Thanks in advance,
Andy

Entity Framework would be the obvious choice as Microsoft's own ORM. It definitely supports mapping to stored procedures, and generating models from databases (aka. "Database First" in EF parlance).
You mentioned that you use multiple databases - this makes things more complicated (in any ORM) - as a word of advice, there is absolutely nothing wrong with creating multiple models in EF, especially if you line these up with your bounded contexts.
Julie Lerman's books are probably the best resource for learning EF: http://www.amazon.co.uk/s/ref=nb_sb_ss_c_0_12?url=search-alias%3Dstripbooks&field-keywords=julie+lerman&sprefix=julie+lerman%2Caps%2C211
There are also lots of courses available at Pluralsight.

I would definitively recommend you to have a look at ServiceStack.OrmLite!
It fits exactly to your needs as it maps a POCO class 1:1 to an RDBMS table.
It allows you to call Stored Procedures, comes with T4 templates to help you out with the code generation part and it’s really simple and pretty fast!

I have use CodeSmith extensively, and can hightly recommend it: http://www.codesmithtools.com
I used Codesmith for a few years, creating my own implementation using the CSLA.NET framwork, these days however I use T4 Templates with the Entity Framework, which works very well.
I would recommend EF and T4 templates if you want to use EF and Codesmith if you want to build your own ORM based on your own architecture or something similar to that of ES.

Related

Microsoft Dynamics CRM or SQL Server? [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 my organisation we write many custom mobile solutions for many different clients. We have started utilizing Microsoft Dynamics CRM 2011 in some of our test products however almost all of the work we are using it for is done with custom entities and the solutions are utilizing it as a back-end database. From my impressions so far, using CRM in this way is counter-intuitive and slow.
From your experience, would there be any benefit I am not seeing by using CRM instead of a normal SQL Server? I have only seen very basic stuff on the CRM front-end but am not sure how the custom entities become useful in CRM?
I write a lot of code for CRM and you are right, it isn't quick. It's benefits aren't for the developer though, they are for the end user. Through workflow and customisation they can create their own system to their own needs and can use the in-built entities to help manage their businesses.
That said, if you are not putting CRM in front of the customer (or using it internally for its true purpose) and are just using it as a database for your application, then this is not a good approach. You'd be better off talking directly to SQL Server.
Microsoft (and many partners) leverage Dynamics CRM as a platform for rapid and extensible development. There is a term we use: xRM that implies you can build many different applications types faster than traditional custom development.
I have used Dynamics CRM in situations simply because of it amazingly granular security capabilities (and built a custom UI for most of the users). Building a row-level security mechanism with the capabilities found in OOB Dynamics CRM 2011 would be a daunting task in itself...I often tell my new CRM developers, "when you are building your CRM, make sure you include: user data imports, row-level security, solution file deployments, simple form customization, custom views, etc."
With CRM 2011, you start with all of that and have a product with well designed extension points (plugins, workflows, web resources, JScript API, OData, SOAP). All without writing, testing, debugging a single line of code. The other thing I tell developers: coding is expensive, so don't write code :)

Should I use KnockoutJS, SilverLight, or both? [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.
I know they both use MVVM. Both are used in web development. But should I consider using both in a web app? Is that redundant? I've seen I can use KnockoutJS with [ASP.NET] MVC. But I don't know if I can use it with Silverlight in that way or any other way for that matter. I'm a bit new to both, so I don't know how to go about it.
Silverlight and HTML/JavaScript/CSS are both client technologies. So you would choose one or the other. Knockout falls into that HTML/JavaScript category.
On the server you can use any web services you want. Microsoft or otherwise. But if you like ASP.NET MVC, you can use the actions it provides ass your web services. Or you can use WCF services for the web services, too. In MVC 4 beta there is even a special controller type made for service calls (the WebAPI).
But the real answer is "it depends". Your selection depends on what you are trying to accomplish, your skills, who will maintain it, etc.
Not everyone uses Windows, besides Silverlight does not work on Android, iOS.
They are used for different purposes. What exactly do you want to do in your project?
BTW, knockout.js is included in ASP.NET MVC 4 projects by default.
If you don't know what is knockout I think you totslly don't need to use it)
Maybe the question is: what to choose between asp,net mvc and silverlight?
It's totally different technologies just using same pattern.
If you need to support large amount of users on different devices including old browseres you'll better to use jquery (knockout) or you planning rich feature app for small group of people (like admin interface) its easier to use silverlight.
And surely the is no problem to use them together

Database - where should I start from? [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 am new to programming (1 year of C#-winforms) and am from a non CS background. I have not worked with databases yet. As an application programmer, how much should I know? and where should I start from?
EDIT:
Specific topics, books, tutorials, blogs would be appreciated.
Introduction to Databases course: http://infolab.stanford.edu/~widom/cs145/
and this textbook: Introduction to Database Systems, An (8th Edition)
If you just want to get some experience with databases you may want to download and install postgres, and try designing a simple database to use that.
If you don't want to learn SQL then you could get a good book on LINQ, or some tutorials, on DLINQ, aka LINQ to SQL and just start to work with your database that way.
Basically, just install a database, come up with a simple project and start working with it. There are several frameworks you can use, but LINQ may be the easiest to start with.
At the very least, familiarize yourself with relational databases and SQL syntax. Later, learn about stored procedures and advance data manipulation techniques. The internet is full of tutorials and sample code. install (the free) Sql Server 2008 Express for best .Net integration, or MySql if you're Linux-inclined, and start playing. Good luck!
Best place you can start is here:
http://www.w3schools.com/sql/default.asp
Since you're new to C#, it probably means you'll be doing a lot of work in the future using .NET and SQL Server, so you'll want to download SQL Server Express:
http://www.microsoft.com/express/sql/default.aspx
And finally, you should start a pet project to develop your skills. I recommend writing a blog, message board, or version control system from scratch. The idea here is not to produce a commercial product, but to learn the ins and outs of SQL Server, database normalization, and common data modeling problems you'll encounter in the real world.
Good luck!
Start by understanding how databases are structured! Skip SQL for now, just work with the designer of your DB of choice.
One-to-many relationships
Many-to-many relationships
Keys (primary, surrogate, candidate, compound)
Afterwards you can move onto the bible of good database design: Normalization. Learn 1-3rd normalization-form.
Now, you can design a db (yay), and throughout those learning hours I'm sure you've seen some SQL syntax. If you want you can learn SQL here, or you can just sit back and have an ORM do your dirty work (personally, I'm not really good at SQL, I got that "I know what this does"-feeling, which is the bare minimum. I'm doing alright using NHibernate though :) )
Start by learning SQL language. Install a database engine and create/query tables. Then, you could learn how to use an ORM, but only once you know how sql language works.
Begginers tutorial
http://www.w3schools.com/SQl/default.asp
Some orms for .net
http://social.msdn.microsoft.com/Forums/en-US/architecturegeneral/thread/84229d82-1065-4c56-bd12-e95f5a545a02

Why does silverlight exist? [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 13 years ago.
Why not to empower WPF or ASP.NET instead of creating a new product?
ASP.NET is simply a server-side language for websites. While they have added support for things like AJAX ASP.NET Controls, it still can't come close to the level of richness Silverlight is capable of.
And then WPF requires the 200+ MB .NET Framework which can only run on Windows.
Silverlight was created as a lightweight 5 MB plugin that can run on Windows and Mac alike while meeting strict security guidelines for Internet use. From my point of view, Silverlight is a different tool for a different purpose.
WPF is meant for regular desktop applications and cannot be embedded in a webpage (XBAP isn't the same), and ASP.Net has nothing to do with Silverlight. (ASP.Net is a server-side technology; Silverlight is client-side)
To complete with flash and offer an all in one solution to all types of development and take over the world. Not that it will beat flash and its lineup of tools any time soon.
Because no matter how you empower ASP.NET or WPF you won't get the richness of Silverlight, Flash, ... in a web browser. Javascript's kind of limited.
ASP.NET runs on the server, what was needed is something to run on the client.
WPF is empowered enough already, what was needed is something which can run on the client in a secure manner and that can't be used easily to do malicous things. In other words far from "empowering" WPF, some form of WPF needed to be seriously curtailed.
In addition it can't be assumed that a full .NET framework is present on the client, Silverlight is designed to contain just enough of the needed framework to make things happen with minimal requirements on the client.
A better question might be - why are WPF and Silverlight 2 separate things?
My best guess is that the decision was made to separate them "because we always have separate technologies for developing web vs. developing desktop applications" - but things are not nearly so cleanly split anymore and would make sense to see the 2 merge together.
Probably starting from scratch you wouldn't have both Silverlight and WPF.
I suspect that deep in the MSFT psyche they still don't 'get' the web - WPF was a way of modernising drawing on the desktop, adapting it to web was obviously an afterthought.

Which language for a quick GUI app + sqlite database CRUD (2-4 tables) [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.
Which language for quick GUI app + sqlite database CRUD (2-4 tables). Java, Python? (Please no jokes like VBasic), some reference, source code to look on?
added:
First idea:
1 database SQLite (Win) + client GUI app (Win)
clients table + orders table + others
import, export database
add, del, edit, etc. entries
Second idea:
1 hosted database (PostgreSQL ,MySQL) + web app client
clients table + orders table + others
import, export database
add, del, edit, etc. entries
Thinking about Django, RoR or local Java(Netbeans), Python(wxPython+ORM).
???
Try python with wxPython for UI programming. I suggest, that you look for an ORM mapper like SQLachemy.
Somebody suggested dabo which is made especially for your purpose, but I have no experience with it (yet). It works with wxPython and databases like SQLite.
Delphi. It's an ideal fit for this kind of desktop application, and there's a SQLite wrapper available.
Ruby on Rails will do simple CRUD operations very easily - although doing more than that can be a little more complex (would require some reading about RoR's way of doing things). The latest version of Rails automatically uses sqlite databases, and in fact the whole database, and CRUD GUI code can be created with one command (scaffold).
If this is to be deployed then that can be a bit more difficult (although I hear that Capistrano is good) - but for local or intranet use then that's what I'd do.
Whatever you are most familiar with.
Or whatever have better set of ready to go components, so either Java (Netbeans/Matise + wizards) or something else.
Need more info. For in house or will you distribute? Desktop or web-based? If web-based, do you host it or will you have it hosted?
Then there's your personal goals. Really, really do it quick, or let it be an opportunity to learn a language/technology you are curious about, like Ruby on Rails? Linq?
Xojo (formerly called REALbasic), if you want to do a desktop app. The Personal edition comes with SQLite built in and is free on Linux, cheap on other platforms. It's a very clean OO language and reasonable IDE, about as productive as VB6 to work in but much cleaner.
I've been doing cross-platform development for about 15 years and REALbasic is now my tool of choice for straightforward database form apps, including an enterprise accounting system I'm currently working on.
I also am working in Swift, WPF/C#, C++ and Cocoa/Objective-C so I'm not just a "Basic-weanie" :-)
GUI development isn't much easier than with Tcl/tk. Also, Tcl has arguably the best interface to sqlite. If deployment is an issue there's definitely no language that can compete with tcl's tclkit/starkit/starpack packaging mechanism.
Write a XulRunner app; this can run with Firefox 3.0.
http://developer.mozilla.org
C# and WPF, it;s preatty easy and good to know (I've been playing with it for 1 week and fully wrote a twitter client in a few hours.
now Cocoa, and the interface Builder, that is a cool approach even for a simple app.
If you were developing a web app I would suggest a scaffold-enabled site like rails, django or ASP.NET MVC (dynamic data). If its a windows app, nothing beats the productivity and features of WPF/Silverlight, if so consider using OrmLite, a POCO-driven lightweight ORM providing a set of useful extension methods around the common ADO.NET IDbConnection and IDbCommand interfaces. Using only convention and DataAnnotation attributes for configuration, it's effortlessly able to persist models with deep complex object graphs.
A live working example using Sqlite (with full source code) is available here:
http://www.servicestack.net/ServiceStack.Examples.Clients/Default.htm
There is also a complete end-to-end example (i.e. stand-alone, no other config required) on stackoverflow:
xml to sql using linq and C#

Resources