Community discussion forum
.NET Estate Agent Web Service / Website
-
Hi,
I am new to this great forum, just wondering if any of you guys could take alittle time to help me with a university task I have to do.
1) First of all I know quite a lot of J2EE but I have never used .NET and there seems to be so much information on the web and so many different programs involved such as ado, asp, etc that I am having trouble understanding how it works. Basically I need to come up with a .net architecture for an estate agents website I guess this is like J2EE with the client tier, Middle tier, etc. However whenever I look around at the .net architecture examples on the net it seems that .net applications have a massive architecure and not tiers more like a high-level and a low-level architecture or from high level of abstraction to low level of abstraction. Is this correct or should it have tiers like J2ee and does anyone have an example?
2) I need to then build a few of the components from the system design to demonstrate sufficiently that the design is feasible. I am guessing this would be done in Visual Studio but other than that I wouldn't have a clue but guess I can find this bit out at uni or library unless someone has a tutorial or example that might be of use?
Thankyou (in advance)
Chris J -
I happy to offer what I can so to get things clear when you say Tier and webservice / website what should the application comprise of i.e.
Just a website the public can view and agents can login and manage properties
OR
A website the public view and a windows from app that communicates via webservice that agents use manage properties.The first is much simpler (ASP.Net website) and more common the second involves building the website the webservice that stands in the middle and the windows app and possible more. I can't give comparisons between j2ee tiers and .net, it's just a term anyway.
I've made real-estate services before so I can give an outline of the architecture for a website if that what your looking for.
Regards
Brin
-
Hi thanks for your reply I very grateful for anyhelp you can give me as my head feels like its about to explode with all the reading i've been doing. lol. I think i need some practical examples to get a grasp of what is going on.
Just to clarify what i need to do, this is the exact task details from my assignment, I don't want you to do the work for me just to give me a basis from which to start (i.e.an example architecture (both J2ee and .NET) and possibly a small explanation, the software I should use to implement the components such as Visual Studio):
I have to set up a website, www.housebuyers.com. People who want to sell their houses will register the property details on the website, and people wishing to buy will enter their requirements (price band, desired location, features such as garage, garden etc.). The software will match requirements to properties registered, and give the buyer a list of possible properties for sale in the desired location. The buyer can then contact the seller directly to negotiate.
Prepare architectural designs for this application using (a) J2EE and (b) the .NET framework, showing the components you would use. Briefly explain and justify your design choices.
Implement a few of the components for both (a) and (b), sufficient to demonstrate that the proposed architectures would be feasible, and to illustrate the development process with the tools available in each case.
Hope I have cleared up any questions you have, and again thanks for your help.
Regards
Chris J
-
In ASP.NET, you can still still end up with a three-tiered design; such as
Presentation layer (this your aspx pages, with code behind). Your code here plugs into methods exposed by the...
Business logic layer, that can perform any validation and any other logic required for your entity objects, using the...
Data access layer, which deals with the database-specific plumbing required to save and fetch entity objects (executing stored procedures etc)
You might find something like http://www.15seconds.com/issue/050721.htm useful
-
Hi,
Thanks for the link it looks useful, will take a closer look when I get home from work. The only thing with some of the tutorials on the web is that they show you how to make a simple database or dataset and then grab the results from it but not how to link multiple tables and how to search, modify, etc, etc. I suppose i am asking a bit much to find a tutorial that's going to be similar to what I'm doing and will probably end up having to take bits from different tutorials and piece them together, unless brin351 can come back with something that will help (fingers crossed).
Chris
-
Reading the assignment description you don’t need a full working website just a layout and a couple of working pages - I’ll have to leave J2EE side to you - as for .Net here are my thoughts, no working examples sorry but I'm sure you've seen pleanty any way. If you need some example pages I could email them. Visual Studio is generally the first chioce in developing anything .Net, do you have it?
Simply you will need the following
* Pick a database (DB) to use - Access or Sql Server
* Create your DB – table structure etc that will hold the related data. In the context of the assignment you may get away with just a member, property & buyer table to show a working example, but thats for you to decide
* Create the directory structure of the website something like
-bin
-images
-member (protected by froms authentication)
--- login.aspx
--- default.aspx (first page viewed after login)
--- manage buyer / property pages
---web.config
-files
--- holdes images etc of properties
-search
--- property & buyer search, match pages
default.aspx (website home page)
listProperty.aspx
listBuyer.aspx
web.config
etc.......* Components (ASP.Net website using ADO.Net for data access and Forms Authentication for security)
-Say for searching properties - you would use ADO.Net to connect and retreive records from the database and display the results in a datagrid, datalist or repeator control. Matching buyers is much the same
-Say for adding, updating, deleting Properties and buyers again its just ado.net to connet to the DB and perform the operation.
-Member Login you would use Forms Authentication (set in the web.config's) where usernames are held in the member table and checked to validate entered login credentials.
There is not much else to it in essence. You could seperate your data access, validation etc into seperate classes and call it your middle tier, Use "user controls" to hold your navigation menues so they can just be dropped on each page etc etc.
RegardsBrin
-
Thanks Brin
You make it sound easy, I suppose it is if you have experience. lol
I don't have Virtual Studio 2005 but it is available at university, I have also heard that express versions are available freely but only in single language variations. I already have a database structure as shown below:-
I will make a start today to see if i can get some of it to work, not sure how to do the ADO bit but am guessing that once I download and start with Virtual Studio I should be in a better position to ask. I also need to try and explain what the architecture of the finished site is so will do a small diagram and post it to see if you think that it looks ok.
kind regards
Chris J
-
Dear Chris,
I've worked on data driven websites for a number of years but I'm no .Net Guru. Looking at your DB the trick will be the matching DB query & process and how automated it should be. Managing, displaying, inserting etc buyers and property is fairly straight forward. The basics of ADO.NET are basic, below I have pasted some of the common uses of it - obviously the variables need to be customised. Also it's for an Access DB (OleDB) to change it to Sql Server just do a find replace (Oledb > SQL).Say to display some properties in a datagrid, drop a datagrid on the page switch to code view and say in the page_Load sub paste the CONNECTION then READER and bingo! The same for any opperation Like INSERT have a webpage with textboxes for input then on a button click put your CONNECTION and INSERT set textbox.text in the sql parameters and thats it.
Regards
Brin'*******************************************************************************
'CONNECTION
'Open a connection Dim connMain As OleDbConnectionconnMain =
New OleDbConnection(yourConnectionString))connMain.Open()
'YOUR DB Opperation here
'don
't forget to close it when your doneconnMain.Close
'******************************************************************************** 'READER
' Build a OleDB statement string Dim query1 = "Select * FROM TableName WHERE fieldX = @fieldX" ' Initialize the OleDBCommand with the new OleDB string. Dim Command1 As OleDBCommand = New OleDBCommand(query1, connMain) ' Create new parameters for the OleDBCommand object and initialize them to the input values.Command1.Parameters.Add("@fieldX", value)
'Execute the command Dim read1 As OleDBDataReader = Command1.ExecuteReader()bind
to datagriddatagrid1.datasource = read1
dayagrid1.databind()
get individual values like if read1.read() thentextbox.text = read1.item("fieldName")
end if
'*************************************************************************** 'UPDATE 'create UPDATE string Dim query1 As String = ("UPDATE TableName SET" & _" field1 = @field1 " & _
" 2 = @2 " & _
" 3 = @3 " & _
" WHERE key = @key")
'Create the UPDATE Command Dim command1 As OleDBCommand = New OleDBCommand(updateStr, connMain) 'Add the parameter valuescommand1.Parameters.Add("@field1", value)
command1.Parameters.Add("@2", value)
command1.Parameters.Add("@3", value)
'Execute the UPDATE Command Dim recordsAffected As Int32 = command1.ExecuteNonQuery()
'************************************************************************ 'INSERT
' Build a OleDB INSERT statement string Dim query1 As String = "INSERT INTO TableName" & _" (field1, "
" 2, " & _
" 3) " & _
" VALUES ( " & _
" @field1, " & _
" @2, " & _
" @3 ); "
' Initialize the OleDBCommand with the new OleDB string. Dim Command1 = New OleDBCommand(query1, connMain) ' Create new parameters for the OleDBCommand object and initialize them to the input values.Command1.Parameters.Add("@field1", value)
Command1.Parameters.Add("@2", value)
Command1.Parameters.Add("@3", value)
Command1.ExecuteNonQuery()
'******************************************************************* 'DATASET ' Build a OleDB statement string Dim query1 As String = "Select * FROM TableName " & _" WHERE key = @key "
' Initialize the OleDBCommand with the new OleDB string. Dim Command1 As OleDBCommand = New OleDBCommand(query1, connMain) ' Create new parameters for the OleDBCommand object and initialize them to the input values.Command1.Parameters.Add("@key", theValue)
'Execute the command Dim Adapter1 As New OleDBDataAdapter(Command1) Dim ds As New DataSetAdapter1.Fill(ds)
bind
to datagriddatagrid1.datasource = ds
dayagrid1.databind()
'****************************************************************************** 'DELETE ' Build a OleDB statement string Dim query1 = "Delete FROM TableName WHERE key = @key" ' Initialize the OleDBCommand with the new OleDB string. Dim Command1 = New OleDBCommand(query1, connMain) ' Create new parameters for the OleDBCommand object and initialize them to the input values.Command1.Parameters.Add("@key", value)
'Execute the commandCommand1.ExecuteNonQuery()
-
Thanks for the code Brin,
Just a few quick questions:-
I am intending on installing Visual Developer Express 2005 which is free at the minute and comes with SQL Server 2005. Will this be adequate for carrying out this project?
I was thinking about the matching of houses to buyers and had an idea which may or may not be possible. Could I read the buyers details and stores them temporarily somewhere then iterate through the house details to find matches? Store the matches as buyer and property ID's and then make this all happen when the buyer selects a button from a menu called something like "view my matches". Then once I've got that working i could start to look at calculating the amount by which each match is suitable, probably by number of features or percentage of features.
What do you think?
Anyway will make a start as soon as i have got service pack 2 installed on my machine.
Regards
Chris J
Post a reply
Related discussion
-
hey developers out there
by pitsophera (0 replies)
-
Using ADO.NET with SQL Server
by Manjot Bawa (23 replies)
-
High-Performance .NET Application Development & Architecture
by Manjot Bawa (0 replies)
-
An Introduction to VB.NET and Database Programming
by carlosmen (14 replies)
-
OLEDB Connection running like a dog.
by kruelintent (3 replies)
Quick links
Recent activity
- Lovely Liezl Lomibao replied to bar graphs in visual basic.net
- Lovely Liezl Lomibao replied to bar graphs in visual basic.net
- Chongkun Zhu replied to How to Download and Convert...
- Jayaram P replied to How to optimize mysql subqu...
- alessandro gracia replied to How to play MTS/M2TS with q...
- alessandro gracia replied to How to convert mts to mov o...
Enter your message below
Sign in or Join us (it's free).