This is a migrated thread and some comments may be shown as answers.

Step by step guide on building a N-Tier solution

4 Answers 110 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jörgen
Top achievements
Rank 1
Jörgen asked on 15 Apr 2013, 12:46 AM
I'm trying to build an N-Tier application using ORM and Windows Forms.

I've looked at the sample Project "Sofia Car Rental - WCF Plain services with Windows Forms"
Since this is a completed solution I find it hard to grasp how Everything connects together.

I would like to have a step-by-step guide on how to create such a solution.

It should contain Data Access Layer, Business Logic Layer, Windows Forms Presentation Layer, ASP.NET MVC Presentation Layer and of course the neccessary service layers (WCF Plain Services for Windows Form and what ever is appropriate for ASP.NET MVC)

It only needs to display the contents of a data table in a grid where I can do CRUD operations and save it back to the database.
It would be nice if the guide described using both a Windows Forms Presentation layer and an ASP.NET MVC presentation layer
so you can see how to use different presentation layers against the same Business Logic Layer.

This would give me a better understanding of OpenAccess ORM and WCF Plain Services.

4 Answers, 1 is accepted

Sort by
0
Jörgen
Top achievements
Rank 1
answered on 15 Apr 2013, 10:27 AM
I found the step-by-step guide for create the n-tier car rental application. I tried to follow it but at the same time changing it to suit the application that I want to build and I had some difficulties with that so I want to suggest some improvements:

1. When I have Created my Windows Forms Project and added a reference to the WCF Plain Service Project I would like to have a wizard that creates the neccessary scaffolding to access the WCF plain service in the Windows Forms Project. I can then focus on creating my Windows Forms and forget about the Communication part. There is a wizard creating the WCF Plain Service from the entities model. I want a wizard that deals with the WCF Plain Service from the Presentation Layer end.

2. In the step-by-step guide there are many steps that says to add a class to the Project but it never says what that class does or why It has to be included in the Project for things to work.

I wanted to create a test Project that takes data from one table in my database and display it in a grid Control where I can edit the rows and save them back to the database.

When I look at the Sofia Car Rental example it uses a DayView Control and appointment objects and there are some scaffolding code in the Project to handle this. I want neither the DayView Control nor the apointments in my Project and want to remove that code from your example and getting things to work like I want to.

So to summarize: Your step-by-step guides should not only tell me what to do. It must also tell me why I need to do thses things.
0
Viktor Zhivkov
Telerik team
answered on 17 Apr 2013, 03:14 PM
Hi Jörgen,

I am not sure that I understand what you mean by 
"...that creates the neccessary scaffolding to access the WCF plain service in the Windows Forms Project..."
Have you tried to use Add Service Reference dialog in Visual Studio or you are looking for something completely different? If it is the later please share with us a more detailed explanation.

Regarding the feedback you have posted about our step by step tutorials that come with the OpenAccess Samples Kit - thank you. We are already working to improve the way these tutorials are put in order to put emphasis on the development steps that you have to perform rather than which buttons or menus to use.

If you are trying to bind a list of entities to a grid in your application then you should look at the SofiaCarRental.MainForm class and the underlying controllers. There are pieces of the sample that are infrastructure code that is required in order to use the RadScheduler control that you can ignore if it is not in the scope of your application.

We will be happy to assist you if you have any further questions how to implement a N-Tier application using OpenAccess and WCF Plain Services.

All the best,
Viktor Zhivkov
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
0
Jörgen
Top achievements
Rank 1
answered on 18 Apr 2013, 06:59 AM
I ment that there are helper classes to convert between appoinments (that are used by the day view Control) and car rentals (that are stored in the database) and this adds an extra layer of complexity into the application. Hence it may not be such a good first example if you're trying to understand how to use WCF and DataAccess ORM.

I would have preferred an example that displayed the contents of a datatable in a grid and a form with textboxes, comboboxes etc that databinds against a table.

Anyway I managed to figure out what I needed and created a form that displayed the contents of a table in a grid. I have some issues with DataAccess ORM that I've posted in a separate thread in the Feature Request forum.
0
Viktor Zhivkov
Telerik team
answered on 22 Apr 2013, 03:20 PM
Hello Jörgen,

The Windows Forms client side code should not be aware that you are using any ORM layer on the server side. You can use the DTO types and instances as if they are normal types so binding them in a grid or to individual controls in an edit form should be fairly straight forward.
This is one of the reasons why we decided to showcase some of the RadControls for Windows Forms. I am sorry that this causes confusion to you.

I will check your feature ideas and if we need any fore details about any of them we will contact you for further information.

Regards,
Viktor Zhivkov
the Telerik team
Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
Tags
Data Access Free Edition
Asked by
Jörgen
Top achievements
Rank 1
Answers by
Jörgen
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or