I have been using Linq-to-SQL. What is a good option for working with mySQL? I have been looking at NHibernate, Entity Framework, etc. Some comparisons (pros, cons) would be helpful
LLBLGen. The current version 2.6 is awesome. The designer is really easy to use, supports entity inheritance, type converters (which also can be used to bridge the gap between different types across RDBMS), validation, auditing, authorization and a ton more. Most importantly though, their documentation is stellar and their support forum is very responsive. The lead developer (who is also on stackoverflow) also answers users questions. I can't say enough about this tool, try it. It is well worth the cost.
The next version is probably going to blow everything else out of the game. In addition to being able to generate their traditional data later, you will be able to gen nHibernate mapping files, entity framework and linq2sql.
Here is a discussion comparing LLBLGen to Entity Framework and to nHibernate (of course it might be biased since it is on their forum).
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=12811
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=14659
Have a look at Mindscape LightSpeed. It includes LINQ querying and a Visual Studio designer that works with MySQL natively. You can update your database or sync changes from your database directly from within the LightSpeed designer also.
Mindscape also publish an open source repository of helpers for asp.net MVC which includes things they have built up to make development with LightSpeed and MVC easier (for example, you'll likely end up wanting a custom ModelBinder for whatever underlying model objects you use - Mindscape provide one that is richer than the default model binder).
There is a free version available to play with:
Mindscape LightSpeed
One of the guys at Mindscape has also written a fairly deep set of blog posts about building up an ASP.NET MVC solution using LightSpeed (although it's probably helpful no matter what you're using :-)
ASP.NET MVC & LightSpeed Blogs Posts
Nhibernate is quite mature and seems be to lighter compared to Entity framework.
Entity Framework works for most things in MySQL. You will notice problems here and there, but chances are they'll all be manageable issues.
Try DbLinq.
It's not a full port of Linq to SQL, but it does the basics.
I haven't used it yet, but there also Linq support in nHibernate now (check the link).
The biggest downside to Entity Framework is the lack of native Lazy Loading. I've used NHibernate and Entity Framework - personally I prefer the richness of NHibernate but Entity Framework is fairly quick and easy to get going and isn't as bad as the rep it sometimes get.
Check out Telerik's OpenAccess ORM. It's free for any free or Open Source database platforms (in your case, MySQL), and provides a slick and easy-to-use GUI. Not to mention that Telerik has great support forums and a huge library of video training.
OpenAccess offers LINQ support, POCO, forward- and reverse-mapping, advanced caching, lazy- and aggressive-loading, no reflection, medium trust, and more. I use it daily (for MS Sql and Oracle data access) and have found it to be a great solution in enterprise scenarios and for my own personal projects.
Try NEntityDb. It allows you query and save data to the database with .NET LINQ Expressions and Fluent API, and eliminate the need for most of the data-access code they usually you need to write.
Related
I'm just in the planning phase of developing my iPhone/iPad/Android app.
Basically the app will query data from remote data sources and store it locally. As data management will be the key feature of this app, so the UI isn't an important factory in this case. I decided to develop a HTML5 and JavaScript-based hybrid application and deploy it with PhoneGap/Cordova.
I'm a .NET developer, I use Visual Studio 11 for web development, so I found the Single Page Application template, which uses Upshot.js by default.
By exploring the alternatives, I've found JayData http://jaydata.org library. It seems to me that it's something similar to upshot.js.
Could you share your opinion, which way should I go to build a cross-platform HTML5 application?
Upshot and JayData looks similar but actually they are quite different, which makes your choice easier. There are things however both provides
Both has pros and cons (as everything in life)
Upshot.js is backed by Microsoft and focuses mainly on oData + Knockoutjs support. It is included in Visual Studio. You can query oData endpoints with it using a procedural query language.Upshot supports read/write operations, and also realtime updates.
JayData supports multiple datasources, among them are oData but also device local webSql as well, plus some other providers too. JayData let's you query oData or webSql on the same with, with sime JavaScript functions, so you dont have to learn sql and oData uri syntax. JayData provide read/write operations but realtime updates require a small user code.
I'm new to the web framework, but have been using Java/Servlet/JSP for my previous web development because I hate PHP. I'm thinking of starting a new feature laden website that I need to quickly create and been deciding on numerous technologies.
I dabbled in Drupal for a while and found it too restrictive and didn't particularly enjoy constantly trying to find a module that almost do what you want so I'm moving over to a web framework.
I considered ASP .NET or Django. Searching on this site, I found a couple of questions ("[Is there any advantage to Django versus ASP.NET MVC other than platform? closed" and "ASP.NET MVC vs. Django - Which framework should I learn?"), but they don't fit my situation.
In my case, I'm new to Python and have to learn that, but am relatively familiar with C# due to Java/C++/XNA and VB Classic 6.0. In both cases, I have no experience with Django/Python or ASP .NET/SQL Server and have never created a site with either.
My reasons are as follows:
I like the idea of having a full stack from one vendor and not mock around with Linux as it took me forever to setup a proper secure setup of Ubuntu, PHP, MySQL and Apache. I don't want technical oddities of learning gazillion different applications with obscure settings to get it working. This is mostly a concern with Django/Python as I believe MS got their stuff well tied togheter.
Django is designed for newspaper website so it focuses on rapid and efficient development of new features with good design principles. I love the idea of there is only one good way to do it and the Django authors perfectionism. The pitfall of course is since 2005 they are still on version 1.2! Ruby on Rails is far ahead of them considering I saw this video. Yeah, I watched the whole entire 3-hours, but didn't understand much from the RoR demonstration.
ASP .NET is appealing to me because I already know C# and VB Classic 6.0. I'm familiar with Visual Studio and like the fact that it is also tied in to Windows Phone 7/Xbox Live Indie games with XNA. However, if those features are used is another question down the road. However, as mentioned before ASP .NET just seemed streamelined with plenty of documentation and support. Future job prospects also seem more in favor with MS technology.
What does the community here think?
I would like to hear different ideas as I beginning web programmer it is very daunting and I have vasted far too much time figuring this out on my own the hard way. Help would be very much appreciated!
ASP.Net and WISC# stack.
WISC - Windows/IIS/SqlServer/C# :)
if you want an MVC Web Framework use ASP.net MVC , since you come from a Java Background C# wont be a problem for you
Django is a good framework but you have to learn python
I don't like django. The forms, the url schemes, the way they assume everyone use models on schemaful db (I prefer to use mongodb because it's so clean and easy).
I am pretty much fluent in all the major languages. I do prefer python because it's very clean but also strict (aka function signatures requires you to pass in only X variables etc).
I want something developed and mature - this means that stuff like authentication, registration etc should all be developed and ready to use.
Any suggestions?
TLDR: Need new web dev framework. Requirement: Nothing. Preference: Mongodb, python.
By the way forgot to mention that I might be looking for employment in the web dev industry. So if you can recommend something that is common among big companies that would also be a bonus. like scala's lift for foursquare (if I am not wrong) and php for facebook.
Rails. It works with MongoDB via Mongoid and has many authentication solutions. You'll find Ruby very comfortable if you have Python experience.
I'm using Flask for Python, and I love it. I'm using SQLAlchemy for Postgre, but it's super minimalistic, so you can use it with whatever you'd like. I've also heard really good things about Pylons, but don't have any experience with it myself.
Spring Framework. (Java)
For authentication you can use Spring Security
It seems like you aren't very keen on using Java, but if you don't mind a different language on the JVM I'd suggest taking a look at Compojure, a web framework for Clojure. It isn't a scripting language but can offer close to the same development speeds once you get used to 'the-lisp-way' of doing things.
I'm unaware of a fully featured MongoDB interface specifically for Clojure, but CongoMongo and Adia (I can't include more than the one link currently so you'll need to google them yourself, sorry!) might have (atleast part of) what you're looking for. If nothing else, you could probably just use an existing Java library to access MongoDB or use a different database. Give Compojure a try though, its definitely productive!
Also on a completely unrelated note, this happens to be my first answer on SO, so please be gentle with the downvotes :)
Pylons.
It will be very fitting for you
Im a big believer in grails. Built on best of breed technologies like Spring and Hibernate, you can fall back to java if you have too. Takes all the pain out of more traditional Java EE development. Has all the important functionality as plugins, you have access to Spring Security, JMS, everything you need. Is very convenient as the back end to a RIA, easily render you models as json, easily handle xml. Its great.
EDIT -- to address the comment, Grails uses the Groovy language, which is scriptable and has some very groovy features. And it is easy to learn if you are familiar with java. Has closures, lots of syntactic sugar.
The scripting part is actually quite invaluable -- you write groovy scripts and import your grails classes to whip up functionality to augment your app (like quick queries into your db)
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
Since we are ambitiously aiming to be big, scalability is important, and so are globalization features. Since we are starting out without funding, price/performance and cost of licences/hardware is important. We definitely want to bring AJAX well present in the web interface. But apart from these, there's no further criteria I can come up with.
I'm most experienced with C#/ASP.net, PHP and Java, in that order, but don't turn down other languages (Ruby, Python, Scala, etc.).
How can we determine from the jungle of frameworks the one that suits best our goal?
What other questions should we be asking ourselves?
Reference material: articles, book recommendations, websites, etc.?
For me, the most important things to consider were:
Fantastic lead developers who I trust to keep working on the project.
Googling a question brings a lot of good answers.
Most importantly, I have to like the way the code flows.
Edit: Also they have to be anal about coding standards. If there is inconsistency, I get very annoyed.
Those 3 points brought me to Symfony. It is always using the latest cutting edge features of the latest PHP version. Symfony 2.0 is using namespaces before any other framework.
Two of your points were:
i18n - there is great support for it (helps that the company behind it is French, so i18n is a first class citizen).
Scales - Yahoo Answers and Vimeo use Symfony and contribute back code. If those guys can scale Symfony to 100 million users, you can too :)
It all depends on the type of project you will be developing.
Are you building a web application or a heavy content website or something else?
You also mix up programming languages with frameworks. The frameworks for PHP that I know are: CakePHP, CodeIgnitor, Zend and Symfony. For an out-of-the-box heavy content website I would suggest Drupal or Expression Engine.
It seems you won't be developing yourself. In that case I would determine the cost and availability of programmers and how widely the framework is supported and by who it is backed. The Zend framework is backed by the guys behind PHP, while CodeIgnitor is backed by the guys behind Expression Engine. Drupal has professional support packages,...
IMHO, for something that will have a lot of users, go for a compiled language.
If you don't try it, you will not know. So, I'd say do a small project in each of the frameworks you are seriously thinking about. I would prepare myself to do a lot of testing if it's something I'll be maintaining for some years. It's better to start off on the right foor than to get half way through a project only to realize you took the wrong path. There may be some requirements that end your search. For example, your servers' OS, a framework feature, or scalability. If you lay out your software plans and requirements, you probably will have very little left to choose from - unless your project really is quite generic or simple.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need some resources that talk about how to design your software to be extensible, i.e. so that other people can write add-ons/plug-ins that adds functionality to it.
What do you recommend? Any books out there that discuss the subject?
I would prefer something that's short and to the point; a bit of theory and a bunch of concrete examples.
I'm not targeting a specific language, I want to be able to understand the core idea so that I can implement it in any language.
And for the same reason, I prefer not to do it using a framework that someone else built (unless the framework is not very high-level, i.e. doesn't hide too much), at the moment I only want to educate myself on the subject and experiment with various ways to implement it. Plus, a framework usually assumes user's knowledge about the subject.
UPDATE
I'm not asking about OOP or allowing my classes to be inherited. I'm talking about designing an application that will be deployed on a system, such that it can be extended by third-party add-ons AFTER its been deployed.
For example, Notepad++ has a plug-in architecture where you can place a .dll file in the plugins folder, and it adds functionality to the application that wasn't there, such as color-picking, or snippet insertion, or many other things (a wide range of functionality).
IF we're talking .NET, try Scripting .NET applications with VBScript over on CodeProject. Lots of concrete examples there.
Below are sites implementing various application extension techniques
ClearScript - Makes V8, VBScript and JScript available to .NET apps
CS-Script - The C# Script Engine
Plugin Architecture using C#
Opinio plugin architecture
Notes on the Eclipse Plug-in Architecture
Plug-in Architecture Framework for Beginners
Gecko plugin architecture
Fungimol plugin architecture
OSGI is a good practical example of a technical framework allowing to do what you are after.
The theory is here.
The (free!) book is there.
Extensibility and the ability to write plugin must deal with service lifecycle
adding / removing service/plugin on the spot
managing dependencies between services
managing states of services (declared, installed, started, stopped,...)
What is OSGI for ?
One of the main functions of a module is as a unit of deployment… something that we can either build or download and install to extend the functionality of our application.
You will find a good introduction here, on the central notion of service (which is related to your question, and which explain some problems around services, key component for extensibility).
Extract:
Why are services then so important if so many applications can be built without them? Well, services are the best known way to decouple software components from each other.
One of the most important aspects of services is that they significantly minimize class loading problems because they work with instances of objects, not with class names. Instances that are created by the provider, not the consumer. The reduction of the complexity is quite surprising
Not only do services minimize configuration, they also significantly reduce the number of shared packages.
Implement SOLID principles in your application.
1. Single responsibility principle: A class should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class
2.Open/closed principle: Software entities … should be open for extension, but closed for modification
3. Liskov substitution principle: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
4. Interface segregation principle: Many client-specific interfaces are better than one general-purpose interface
5. Dependency inversion principle: One should Depend upon Abstractions. Do not depend upon concretions
Stackoverflow questions:
Example of Single Responsibility Principle
Is the Open/Closed Principle a good idea?
What is the Liskov Substitution Principle?
Interface Segregation Principle- Program to an interface
What is the Dependency Inversion Principle and why is it important?
You try to reach two competing goals:
The components of your software must expose a lot of themselves, so they can be reused
The components of your software must expose very little of themselves, so they can be reused
Explanation: To encourage code reuse, you should be able to extend existing classes and call their methods. This isn't possible when the methods are declared "private" and the classes are "final" (and can't be extended). So to meet this goal, everything should be public and accessible. No private data or methods.
When you release the second version of your software, you will find that many of the ideas of version 1 were plain wrong. You need to change many interfaces or your code, method names, delete methods, break the API. If you do this, many people will turn away. So in order to be able to evolve your software, the components must not expose anything that is not absolutely necessary - at the cost of code reuse.
Example: I wanted to observe the position of the cursor (caret) in an SWT StyledText. The caret is not meant to be extended. If you do it, you'll find that the code contains checks like "is this class in the package org.eclipse.swt" and a lot of methods are private and final and whatnot. I had to copy about 28 classes out of SWT into my project just to implement this feature because everything is locked down.
SWT is a nice framework to use and hell to extend.
Of course there is the famous Open Closed Principle - http://en.wikipedia.org/wiki/Open/closed_principle
Well it depends on the language.
In C/C++ I'm pretty sure there is a loadlibrary function that allows you to open a library at runtime and invoke it's exported functions. This is typically how it's done in C/C++.
In .NET, there is Reflection, which is offers similar (but more broad) to loadlibrary. There is also entire libraries built on Reflection like Managed Extension Framework, or Mono.Addins that does most of the heavy lifting for you already.
In Java, there is also Reflection. And there is the JPF (Java Plugin Framework) which is used in stuff like Eclipse IIRC.
Depending on what language you use I could recommend some tutorial/books. I hope this was helpful.
Plugin architecture is becoming very popular for its extensibility and thus flexibility.
For c++, Apache httpd server is actually plugin based, but a concept of module is used instead. Most of apache features are implemented as modules, like cache, rewrite, load balancing, and even threading model. It is a very modular software I ever saw.
And for java, Eclipse is definitely plugin based. The core of Eclipse is an OSGI module system which manage bundles, another concept for plugin. Bundle can provide extension points on which we can build modules with less efforts. The most intricate thing in OSGI is its dynamic characteristic, which means bundles can be installed or uninstalled at runtime. No stop-the-world syndrome any more!
Since I dont have enough rep points to leave a comment, I am posting this as an answer. SharpDevelop is an IDE for developing applications in C#/VB.NET/Boo. It has a pretty impressive architecture that allows itself to be extended in a number of ways - right from new menu items to development support for whole new languages.
It uses a bit of XML configuration to act as a glue layer between a core of the IDE and the plugin implementation. It handles locating, loading and versioning of plugins out of the box. Deploying new plugins is matter of simply copying in the new xml configuration file and the required assemblies (DLLs) and restarting the application. You can read more on this in the book "Dissecting a csharp application" by the original author(s) - Christian Holm, Mike Krüger, Bernhard Spuida of the application from here. The book doesnt seem to be available on that site, but i found a copy that might still be around here
Also found a related question here
Checkout "CAB" - Microsoft's Composition Application Building blocks Framework. I think they've got a "web version" of that too...
I have just started to develop a smart client application. These are two options I am considering.
Using Microsoft's System.AddIn namespace. Looks very promising, however it may be a little complex for our end solution.
Or the Smart Client - Composite UI Application Block from Microsoft
Recently, i have looked at taking components both the Composite UI Application Block and the System.AddIn namespace to build my own. Since source code is available for the CAB it is easy to extend. I think our end solution will be a light weight version of the CAB, definatly using the Unity Application Block
If you work with .Net, our research yielded two approaches: scripting and composition.
Scripting
You extend the functionality of what your classes can do by orchestrating them using scripts. That means exposing what is compiled in your favorite .Net language in a dynamic language.
Some options we found worth exploring:
IronPython
IronRuby
JavaScript: Jint, Jurassic and JavaScript .Net are good starting points.
Script.Net -> this one was the first one to call our attention.
Composition
If you start a project with .Net 4 or above, you must take a good look at the Managed Extensibility Framework (MEF). It allows you to extend the functionality of your apps in a plugin way.
The Managed Extensibility Framework (MEF) is a composition layer for
.NET that improves the flexibility, maintainability and testability of
large applications. MEF can be used for third-party plugin
extensibility, or it can bring the benefits of a loosely-coupled
plugin-like architecture to regular applications.
Managed Add-in Framework is also a good read.
MSDN: http://msdn.microsoft.com/en-us/library/dd460648.aspx
Codeplex: http://mef.codeplex.com/
Rather than re-inventing the wheel, use the frameworks in hand. Eclipse and Netbeans both support plugin based extensions. You have to work in Java though.