Is Eloquera or db4o better suited for my web application? - asp.net

I'm considering using an object oriented database in Visual Studio .NET for my web application, which is basically a web store.
Which should I consider, Eloquera or db4o? Can I have some fresh perspective?
A similar question was asked like 10 months ago - please also mention changes since then.
The features that I consider important are:
Ease of integration into web application project.
Ease of querying using LINQ.
Ease of deployment upon release in IIS server.
Multi user support.

Looks like db4o could be a fit for your needs, but that depends on two factors:
If you're going to host your web store on a hosting provider db4o won't work in a limited trust environment
Depending on the number of simultaneous users, db4o could be a fit or not. As a rule of thumb I would say that if you're talking about more than 50 users hitting the db at the same time, then you should look at other options (one example: Versant Object Database).
Disclosure: I work for Versant and db4o.

Another option would be RavenDb -- it is more of a document database than an object database but it satisfies your requirements by and large:
Easy Integration: insanely easy; use nuget
Easy Linq: linq is the query platform
Easy for IIS: pretty much set up an application pointed there and you are done
Multi-User: yup.

I suggest Eloquera. All the pros of db4o (and more), less some cons...
Real World Experience of db4o and/or Eloquera Database

Eloquera is multihreaded, in opposite to db4o. So, if you expect more that a single visitor to your website, Eloquera is an obvious winner here.
Moreover, Eloquera provides the object-oriented and document-oriented APIs, which can be used together.

Related

General Structure for ASP.NET Enterprise(ish) App

I'm the custodian of a pretty sophisticated, yet antiquated, ASP.NET application. It is essentially a platform that makes creating database applications easier - with tools to read in database schemas, auto generate forms, reports, charts, and provide extremely extensive tools to manipulate those things within the UI. There are some pretty big clients using the platform for some niche applications, and despite the age of much of the code (some of it written as early as 2001), everything runs pretty well.
The company is doing well enough that i need to start considering a new version, and rather than plastering on some new features, i'd like to consider a fresh start. The current solution is a ridiculous 150 projects - down from about 220 when i first started working on this full time.
Does anyone have any tips or suggestions for the general structure of an enterprise(ish) level application? What new technologies should i consider? Maybe some particular books or websites i should review?
I've got a good handle on all of the specifics that make our platform so flexible - but because i've been locked into the general structure of our code for so long, i feel like i'm way out of touch with how the entire thing needs to be structured on a large scale. The current application still has a bunch of .NET Remoting for communication with the databases (just a tad out of date), and a ton of incredibly inefficient code written by someone who wasn't really a programmer.
WCF to serve info from the data access layer? WIF to authenticate? I'd really like to be able to assemble an API that my business partners can use to connect to the data and use a huge collection of common functions i've got set up - ideally that API could run in a web context or in some other environment.
I know this is a pretty big question that could have a lot of possible answers - just looking for some thoughts on where to really spend our research time.
Thanks!
-RP
If you want to rid yourself of all the authentication / authorization hassles, absolutely go for claims-based applications, WIF, ADFS etc.
That's the Microsoft direction - CMS, SP. Office 365. Windows Azure AD etc. are all now claims-based.
Only problem is that ADFS authenticates against AD. Have a look at Identity Server for something DB related.
Plus ADFS via ACS provides Facebook, Google etc. logons.

Sharing stored procedures across multiple apps

Team A has an enterprise app that uses ADO.NET for data access that executes stored procedures. The data access is encapsulated in it's own project (let's call it DAL.dll)
Team B is creating another unrelated app that's reusing the stored procedures in the enterprise app. This app is currently using the MS application block for data access. The issue we run into is that whenever Team A make any change to the input/output params in the stored procedures, there is a runtime error in Team B's app and this app needs to be updated to accommodate the additional params (or params that were removed). So, most of these go unnoticed until a user complains. At the very least, we would like to have the app throw a compilation error so that the build process warns us of the changes made.
One way to do this is to have Team B's project add a reference to the DAL.dll
I'd like to know if there are any other cleaner ways of solving the issue. We are ready to replace Team B's MS Data application block to use a different technology (Entity Framework?) if necessary.
Among the other answers, I'd strongly suggest getting those stored procedures into source control, in a Database Project. You then may be able to use the features of your source control system to do several things:
Lock some of the code so that it cannot be changed
Give you notifications if the code is changed
Warn you if the stored procedures change in a way that would prevent them from being called
Branch the stored procedures so that each team can have their own version of changed code, while keeping the unchanged stored procedures common. You of course will need to separate the different versions in the database.
I agree with the other posters on this thread that you should not share stored procedure's across different .NET DLL's, that is just a recipe for disaster. I would also shy away from ORM's like Entity Framework if you are doing anything at all complicated with your database schema because ORM's excel at getting a simple object model translated from your .NET application classes into SQL tables and SP's, but traditionally do poorly at optimizing them for performance on the database side. There will be people who claim otherwise, and they may have a valid point if you are an expert in wrangling an ORM to do waht you want like they are, but chances are you are not and it will cause you headaches in the long run.
A shared data access layer might work, but conceptually you are then just changing the implementation of the dependency from some code that a DBA wrote to some code that a .NET programmer wrote. Yes, you can use integration tests to achieve better verifiability, but the same case could be made for SQL with tools like Red Gate's SQL Test. I would shy away from this approach if the two applications are already experiencing some sort of pain from sharing SP's. That is an indication that the dependency just should be done away with.
If it were up to me, I'd just make a new schema for Team B's app. You can read more about schemas in SQL Server here: MSDN Schema description for 2008 R2. You can think of them as namespaces for SQL Server but with some additional bells and whistles like permission and access control. Separating out your different applications into separate schemas on the same shared database will probably make for the most flexible implementation in the long run.
unrelated app that's reusing the stored procedures in the enterprise app
If these two application are really unrelated why are those sharing procedures or even the same database. I know this is a long read, but I recommend you to read this: A Better Path to Enterprise Architectures
The partioning concept in there relates to the bounded context in Domain driven design:
Multiple models are in play on any large project. Yet when code based on distinct models is combined, software becomes buggy, unreliable, and difficult to understand. Communication among team members becomes confusing. It is often unclear in what context a model should not be applied.
Therefore: Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.
It is expected you end with problems when you don't explicitely deal with this. You're lucky you're seeing early failures, as it can turn into problems much harder to find on the long run.
Analyze the problem again with the above in mind. Consider if you're missing some explicit context where this common functionality should live.
My question is: which team owns the store procedured and the database shared? Usually as a good architecture/design, you should not have two different apps sharing same database / procedures.
A better way to share data/functionality between two different applications is through a services or API, so the team who owns the functionality would be responsible to maintain it.
Also, have a good communication between both teams is highly recommend.
Depending on the owner of the DAL project, you could host web services and share the API. That way, you separate the Data Access Layer from the business logic, which allows anyone to use the same DAL without having to publish it to each different location.
From my point of view, it looks like both Team A and Team B should share the same core model and look at Multitier architecture as a possible solution.
It sounds like it would make sense to create a shared DAL that both applications can share.
I would add unit tests (or really integration tests) to make sure the DAL is compatible with the apps after changes. That way your tests would fail if incompatible changes have been made
"I'd like to know if there are any other cleaner ways of solving the issue."
The cleanest way is for Team B to sit down with Team A and encapsulate the relevant business logic into a shared API. It doesn't matter so much how you implement that API; what does matter is that the API's interface is documented and versioned so everyone knows what to expect.
One reasonable mechanism for this in a .NET environment is to use Microsoft's WebAPI.
In short, the question of "how do we share a stored procedure?" is most likely looking at the wrong level of abstraction.

Rich Internet Application (RIA) for Oracle Database Application

Our Oracle application is written in Oracle Forms. However, there is a requirement for it to be a Rich Internet Application (RIA). I.e. no deployment, accessed via web, looks and navigates (tabbing etc) as closely to a desktop GUI application as possible.
Apex has been discarded as not good enough and will not produce a sufficiently good user experience and does not look good compared to other technologies.
Silverlight is being suggested as the best way forward, but I would like to know what else is out there.
I have had suggestions that the way forward is to use HTML5/CSS, but we need a good framework for managing records. I do not wish to be reinventing the wheel. I understand that Silverlight for Business Applications takes care of some of those requirements.
Also, the idea is to create web services in Oracle and have a Silverlight front-end. Is this possible / the right way of doing things?
Any pointers in the right direction or thoughts would be appreciated.
Thanks.
Apex has been discarded as not good
enough and will not produce a
sufficiently good user experience and
does not look good compared to other
technologies.
Oracle Apex has all the features that you are looking for. You can customize it using CSS, users can access it using web and since your current application is in Oracle Forms, you can reuse a lot of your code written in Oracle procedures/packages/triggers. Also, the learning curve for your Oracle Developers would be very smooth.
I'd suggest you to try and create a small module for your future project and see how effective it is in terms of both Development time and the rich UI.
I don't know much about it, but you might want to look at FormSpider.
And of course there is Oracle ADF.
Like Rajesh, I bridle at the suggestion that Apex is "not good enough", having been heavily involved in a very successful Apex project ;-)
From my point of view,there is no direct dependence between your future RIA's and the RDBMS you are using now. In other words,features and advantages of Silverlight\Entity Framework are almost equal for different data sources (e.g SQL Server,Oracle and etc).
Also, the idea is to create web
services in Oracle and have a
Silverlight front-end. Is this
possible / the right way of doing
things?
Using a middle tier (WCF or WCF RIA Services) as a data access layer will be more preferable than creating web-services in Oracle.
This tutorial can be usefull for you to get some general view of the Silverlight and WCF Ria Services.
http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx

if I use Nhibernate can I Switch between databases and not change the Nhibernate code?

What I want to do is convert my whole application to nhibernate from ADO.NET and test it using different databases. i know nhibernate supports many different databases so can i switch between different databases without changing any of my application or nhibernate code?
As long as you do not write any specific queries targetted for a specific DMBS (which is possible using NHiberate (ISession.CreateSqlQuery), I would say that it is possible.
But, queries that have been written using hql or ICriteria API should work out of the box on other DBMS'es. (Provided that NHibernate supports those DBMS).
Although, it might be necessary to change some config settings (http://fgheysels.blogspot.com/2007/07/nhibernate-ms-access-problems-with.html for instance).
The short answer: yes. The long answer: It depends :-) I've done this numerous times, switching between SQLite (during early development and unit testing) and SQL Server (for later development, integration testing and production) with no code changes or recompilation - just Web.config changes.
If your application is fairly complex then you might run into some portability issues, but NHibernate is still a no-brainer if you want to support multiple RDBMS products for your application. Any such portability issues will usually be fairly straightforward to work around.

High Performance Database Access Layer in asp.net

I am developing a applicatin which are having more than 5000 users once upon time. I using
ASP.NET 3.5 framework for developement. I want to develope a high performance DAL Layer
using latest technolgies like linq,ADO.NET Entity,ADO.NET Data services. I also want to make sure that it shuld be generic to all the future developement. Can any one pleasae Let me know which pattern i should use to develope that Database Access Layer. I am also
want to use microsoft enterprise library for that.
I think you should look at NHibernate and Fluent NHibernate.
You could save yourself a lot of time by not writing your own DAL. Only you know your non-functional requirements around perf and whether you're optimizing for reads, updates or something else, so write some tests, prototype, and see how it goes.
My personaly opinion is that Microsoft Ent Lib and perf aren't best buddies, but again you should prototype and prove this early in your dev cycle.
You can use Linq to SQL.
You can also take a look at this article series for creating an actual DAL using the same technology.

Resources