Forum Moderators: open

Message Too Old, No Replies

ASP.NET project management and Access DB Optimization

two questions for the price of one!

         

ApexWatson

7:51 pm on Aug 26, 2004 (gmt 0)

10+ Year Member



Hi, this is my first post here. Hopefully you are all brilliant geniuses with all of the answers I seek in the tip of your finger.

First of all, what is the best way to manage a site that mixes asp and html? I mainly edit and code my site in Dreamweaver, but when I want to use ASP.NET i crack open Visual Studio. I've been creating asp pages/projects wrong tho....i usually create a C# web application, which sets up seperate .aspx and .aspx.cs codebehind files. When i first noticed this i decided to give it a try, thinking that it might be nice to separate the heart of my C# code and my html. However, it took some time to realize that a Web Application is actually a VS project that creates a dll of the compiled codebehinds instead of just interpreting the server side code on the fly. I was having to remove the "SRC" attribute while testing locally and then since I didn't "publish" my web application the dll never made it up to the server and i had to reinsert the "src" attribute that pointed to the aspx.cs codebehind. So when you are developing a site from scratch, is there a convenient way to establish an ASP.NET project for the whole site that does not rely on compiled dlls? I want to have all my asp.net files that i will be using in the same project in Visual Studio.

OK, next question. I have set up a couple of asp.net pages that access the same MS Access database. All they do is return rows from a "Dates" table for when my band is playing. One page populates a Calendar control and the other dynamically creates a table that contains the date/gig info. The work super fast most of the time, but it seems as tho if someone accesses one of these pages and then just leaves the window open, other people trying to access have to wait a long time. I will post the code below shortly. Maybe i'm not closing a reader or connection?

ApexWatson

7:54 pm on Aug 26, 2004 (gmt 0)

10+ Year Member



OK. i wasn't closing a reader (the one and only used) could this be reposnsible for the syptoms i have described? perhaps time will tell.

TheNige

11:21 pm on Aug 26, 2004 (gmt 0)

10+ Year Member



Why not have 1 compiled DLL?

Small Website Guy

2:46 am on Aug 27, 2004 (gmt 0)

10+ Year Member



It's better to make a compiled DLL because the application runs faster and is more scaleable and also is easier to design.

Microsoft Access probably won't create a very scalable solution. You want to use SQL Server.

ApexWatson

3:02 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



I guess I could have one dll for an entire site. Is this standard practice? I don't really find any kind of documentation for people doing it this way. I usually find lots of examples in the old school style of code and html in the same file separated by <% %>

If I were to use one dll, it seems that instead of naming the solution DateManager or SongManager I should name it MySiteApps.dll and have the DateManager and SongManager as projects within the solution. Sound like I'm on the right path?

RainMaker

3:47 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



ASP.NET was created to be more scalable and faster than it's predecessor ASP. The neat thing about ASP.NET is that you can have your server code separated from your interface. ASP users to ASP.NET sometimes hickup so to speak when they are developing in the new IDE. You can put your server side code with the html code but remember you want to be able to compile it to the dll. Making the dll allows the server side code to be "compiled" vs parsing through code and doing something with it like old asp. If you are going to use ASP.NET use it to it's fullest. It might be a lil painful to start off but you will get your results ten fold.

May I ask what made you decide asp to asp.net vs php5 or something? I am guessing because most of the site was already in asp. that is cool though.

as far as your DB is concerned, Access wasn't really created to be a large scale DB with multiple people accessing it at the same time over the net. (Basically) the way it handles its threading for different tasks and access attempts it doesn't do well and it's performace degrades faster over time. You really need something that Small Web Site Guy suggested...like Sql Server. Hope that helps.

oh yeah...If date manager and Sound manager is two different sites then it would make sense to have them in the same solution. They will compile respectively but the solution doesn't compile to a dll...that is just a file that sits there that manages your projects...it allows you to different things inside studio to handle them differently or the same.

ApexWatson

4:10 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



Hey thanks for the responses. I chose ASP.NET for a couple reasons. 1) I am a developer who uses Visual Studio everyday and I wanted to give the RAD choice a shot. 2) The first web programming I did was with ASP and I am more familiar than php.

Don't get me wrong though, I have a linux box that harnesses the power of the open source php community, using the OSCommerce and PHPBB applications. I love them! However, since they were so easy to configure I have yet to really get my hands dirty working with php.

The Access stuff: I used access for a couple or reasons. The NT box that I'm running my ASP site off of doesn't include MYSQL free of charge. Also, this is not a user heavy site, its just my band website. It would be hard to imagine two people hitting the DB at the same time so I though Access would work...also, since I closed that reader object I haven't seen the same latency as before so perhaps the problem is solved.

OK, well if you guys think that I should harness the full power of the new ASP.NET then I will continue to develop full fledged web applications. I just need to consolidate my different projects into one solution. Does the web publish feature of visual studio allow you to publish only one project? Are there seperate dlls for each project? I would guess so.

I also guess this means good bye to forcing the "SRC" attribute in my page directive on the aspx file!

Thanks again, and any other pointers you may have are more than welcome!

Small Website Guy

6:19 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



I might add that I don't really know how well Access will scale up in an ASP.NET environment.

I do know that in a client/server environment the performance is really bad, because an Access DB is just a dumb file that the JET driver on the client machine reads and interprets.

Maybe in a web environment it would work better because it's all on the same machine... no network traffic issues, and if it's a single processor machine the database is probably being read only once at a time (which in itself doesn't sound that scaleable).

People avoid SQL Server because it costs money: $5000/processor. A real bargain if you consider how much developers chage per hour, but lots of people are "penny wise pound foolish."

While not everything MS does is great, I think that SQL Server and ASP.NET are great products.

NetRoll

1:31 pm on Aug 28, 2004 (gmt 0)

10+ Year Member



You don't need to sreate a new project every new page, just add a webform to an existing project if it's for the same site.

As for access, like people said, I suggest you get a copy of mysql (should be free if you don't make money out of it)

Another note, dll compiled by VS.Net are not "usual" dlls, sonce you can overwrite the file like any other file, you don't need to unload it from memory before.