I'm interested to run CSLA framework with .NET data provider for PostgreSQL under Linux.
I think I need to use MONO for this.
How to use PostgreSQL database and run framework sample WinForms application in MONO ?
I tried google search but havent found any information about this.
Andrus.
No, you do not need Mono to do this if the only thing you will have on linux is the PostgrSQL database. As long as your application server is a Windows Server with IIS all you need is a PostgreSQL .Net Data provider that will interact with you remote database on the linux box. Your connection string will point to the db server.
Here is one PostgreSQL .Net Data provider...
http://www.download.com/PostgreSQLDirect-NET-Data-Provider/3000-10253_4-10388002.html
And here is a site that will help with any connectiong string problem you may have...
http://www.connectionstrings.com/
As an alternative to the PostgreSQL .Net Data provider you can use the System.Data.Common.DbProviderFactory if you are using .Net 2.0. This is a generic data provider.
Hope this helps.
My ultimata goal is to create WinForm or GTK# GUI application running under Linux.
I want to develop in using Visual C# 2005 Express Edition.
I prefer to use open source and free net data provider from http://pgfoundry.org/projects/npgsql
Is there any sample code for use CSLA with npgsql data provider ? Have anybody tired to run CSLA WinFor application in Linux ?
Clarification required...
Are you looking to "run" a CSLA based app (complete with db and business objects) on mono?
OR
Are you looking to only have the db on the linux server?
Okay, we posted at the same time and you pretty much answered my question - sorry.
I have not used a CSLA app with PostgreSQL but if you can connect to a PostgreSQL database using the sample connection strings provided in my previous post that istdoes not matter if your app is Csla based or not. If you can connect from with .Net then you should be able to connect from your Csla BO's.
I have connect to databases such as SQL Server, Oracle, and Firebird in the past I they work fine, regardless of Csla or not. So, I don't see any problems in you using PostgreSQL on a remote linux box.
I need to port large GUI accounting application to Linux. This application in written in Microsoft Visual FoxPro so this will be complete code rewrite.
I created this application prototype: WinForm application which connects to PostgreSQL database using npgsql and allows edit data in DataGrid and uses MainMenu (DataGridView and MenuStrip do not work in MONO, .NET 2 Winforms are mostly not implemented).
I have three choices now:
1. Find a GUI framework which supports MONO and Postgres. I tried but hav'ent found such.
2. Create my own framework.
3. Modify CSLA 2.1 (CSLA 1.1 fails to buid on VCS Express 2005 so I don't consider this) or some other framework.
Modifying CSLA 2.1 requires the following changes:
1. Change all .NET 2 Winforms controls to .NET 1.1 controls to work in current MONO
2. Change all other .NET 2 API calls to .NET 1.1 API calls to work in current MONO
3. Change CSLA database access logic to work with MONO and npgsql
So using CSLA seems to be huge work.
I need also a GUI report designer which can be used by end users. Currently I'm planning to use http://www.fyireporting.com
Can you recommend which way I must go ?
Andrus.
| |
|
> You will not be able to successfully target .Net 1.1 using VS2005.
I'm planning to target MONO .NET 2 profile using VCS Express 2005 and CSLA 2.1
> You're going to make much moer work for yourself fighting it. For example, VS2005 will use partial classes for forms. .Net 1.1 compilers don't support that.
I tried MainForms and Datagrid in VCS Express 2005. Generated Winforms code contains partial classes. After removing parameter passed by generated code to MainMenu constructor manually this code runs in MONO.
> Do not go this route, you'll be in for a world of hurt. If you want to target 1.1 (which will more likely run on Mono), use VS2003.
Please give any example why this hurts (partial classes work OK in MONO ). It seems that MONO supports .NET 2 version of C# well.
.NET 1 classes WinForms support is not good. MainMenu implementation is incomplete.
.NET 2 WinForms classes do not work (DataGridView causes 100% CPU usage). Many .NET 2 classes are not implemented.
I do'nt know CSLA well (I'm planning to read the Book in this weekend). So I have no idea how many time it will take.
How to find the number of .NET 2 only classes which are used in CSLA ?
> Your best bet is probably either 1) go the Java route. I hear Eclipse is a great IDE and is free.
I do'nt know JAVA. Please re-confirm, is it most reasonable way to move to Java. I have heard that .NET is better than Java since it is newer design and Microsoft/MONO has put more resources to it than Sun.
> 2) Go the web application route. This will require a Windows web server (Windows Server 2003, Web Edition is $800). You'll need only this one server, which can talk to your Linux PostgreSql server. The clients can be any browser you support (IE and Firefox are good targets).
I'm creating horizontal market application for people who want to avoid Windows. So using Windows is not possible.
> I once tried Csla 1.x under mono. Lack of practise makes linux hard work for me so I just ended up using the 'binaries' made by Visual Studio and runing those using mono.
I have the same situation: no experience on Linux but wish to create application for Linux. I'm planning also to create CSLA based .exe and .dll files in VCS 2005 and
> All the tests passed, but I did have to make one change to resources. This only happened because en-US is not my default locale. I think there was an inconsitency in how the CLR implements resources. Mono didn't replicate that inconsitency at the time, so I had to rename the default resource file in csla to resources.en-us. The tests all worked just fine after that.
Have you tried to run CSLA WinForm based application ?
> I'm not sure about how 2.0 would work, but I think I read that the mono project will support all 2.0 features by the end of the year
Where do you read this? I observe MONO lists. It seems that maybe Winforms 1.1 implementation may be completed in this year. Nobody knows .NET 2 Winforms completion date or even will this completed on not.
Andrus.
>didn't immediately find anything that indicated how far along they were to add in .net 2.0 support.
I think that they (payed programmers working in Novell for MONO in Boston and volunteers in world) do'nt know it. This is open source project and it depends how much programmers join with it.
> But if you really can target .Net 2 and have it work in mono, things should be much easier for you and in that case Java doesn't make as much sense
Java has more frameworks available than C# since it is older. So what do you think should I switch to Eclipse/NetBeans or try to fight with MONO/CSLA 2.1 ?
Andrus.
I tried to run C# Projectracker applications in MONO using VCS 2005 Express.
In my application I need to edit data in DataGrid.
Results:
CSLA 2 requires BindingList<T> class. This is not implemented in MONO. So CSLA 2 cannot used.
CSLA 1.1 uses VB .NET listview project. VCS 2005 Express cannot even open this project, so editing data in DataGrid is not possible.
So it seems that it is not possible to use CSLA with MONO.
Andrus.
I'm trying csla10cs-060519.zip and ptracker10-040717.zip files, are they latest for .NET 1.1 ?
After commenting out all MSDN.DataListView.DataListView objects and this.pnlStatus/pnlUser.Name assignments WinForms sample rans in MONO if I press Cancel in Login dialog.
I need to test editing data in WinForms DataGrid. I havent found any DataGrid object in .NET 1.1 sample.
Removing DataListView removes all tabular data presentation from sample application.
How to modify Project Tracker .NET 1.1 or create sample in other way which edits or at least presents data in DataGrid ? I think I need to try edit big PostgreSQL table in DataGrid for testing.
I'm not sure can .NET 1.1 WinForms bind CSLA object to DataGrid.
I do'nt have enough resources and knowledge to implement BindingList<T> control in MONO.
Andrus.
Andrus,
This may not be "help", but you are planning on recreating an Accounting package (MAS 90? ACCPAC? :shudders:) on an open source platform that contains incomplete functionality. At the very least, you are taking the risk of running into a whole that you do not foresee now. If some piece of the MONO .NET library remains unimplemented, you will either have to implement it yourself or hope that others will do it for you.
You really are better off taking a look at Java. The bridge from C# to Java is not that wide. There are java application frameworks out there. CSLA is a great framework but you may very well end up losing time to implementation details that are out of your control.
Just a thought.
Christian, thank you.
Yes, I'm planning to recreate an GUI Accounting package which can be run in Linux/Mac. By reading you answer I undrestand now that this is very risky for this to use C#/MONO/CSLA and I should go using Java.
The only sample which I know is Compiere (www.compiere.org) its user interface is not familiar for Windows users. Where to find sample Java application or framework which has user interface familiar to Windows users and allows data editing in grid ?
Andrus.
kobruleht:I'm trying csla10cs-060519.zip and ptracker10-040717.zip files, are they latest for .NET 1.1 ?
> Have you tried to run CSLA WinForm based application ?
Only a Hello World - that worked quite well! I've not had any time to devote to it since.
I just a bit of a play with it after reading a book called cross platform .NET development
http://www.amazon.com/Cross-Platform-NET-Development-Portable-NET-Microsoft/dp/1590593308
> I'm not sure about how 2.0 would work, but I think I read that the mono project will support all 2.0 features by the end of the year
OK I found the place that gave me that idea. I may try Hello World 2.0 at the end of the year. I think there are differing definitions of complete. Some people talk about .NET and mean CLR others mean CLR and all the surrounding technologies. The curse of marketing. (notice I use upper case .NET as I was told MS marketing originally dictated that, except in the logo where it's lower case - there words too, allegedly).
http://www.mono-project.com/Mono_Project_Roadmap#Mono_2.0
The book may be a good read for you. I found it to be quite a good overview of the issues you may face and possible solutions.
Copyright (c) Marimer LLC