This is a discussion on "2-tier ASP application" within the Classic ASP section. This forum, and the thread "2-tier ASP application are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
2-tier ASP application
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
2-tier ASP application
Hello everyone!
I'm working at a company that is creating a web module of its desktop application. Basically, the module will provide some basic reports and tasks of the application that the user can use over the Internet. We are now wondering about the best approach to create a 2-tier ASP (not ASP.NET) application: 1 for the layout (visual elements, common to all pages) and 1 for the asp pages that deal with the interaction with the user (reports, forms, data selection and so on...). We have to use ASP because 30% of it is already done using ASP. What we plan to do is to have only 1 ASP page with the layout and working as a task manager. Which means that this page will receive all the links from the application and will show the right content, using the right Server Side Include (SSI). So, basically this one main asp file will have several SSI on it that will work based on the content of the variable of the asp file that I want to show. Something like this: <html> ... <body> ... <% select case sPageToShow Case "page1.asp" %> <% Case "page2.asp" %> ... and so on <% end select %> </body></html> Is that a good approach? I think this is good because I will have only one definition of the main layout of the application and the other files will only contain the code of what they are really supposed to do. Are there better solutions? or a different approach that I could use and analyse here? As my application is only 30% done, should I consider migrate it to ASP.NET? Thanks a lot in advance, Ricardo |
|
|
|
#2
|
|||
|
|||
|
I'm not sure I understand exactly, but conditional includes are *very* inefficient in ASP. I don't advise this method.
|
|
#3
|
|||
|
|||
|
Do u have any suggestions for that, then?
What exactly didn't u understand? I can explain more. Thanks again |
|
#4
|
|||
|
|||
|
The problem with the conditional SSI approach is that before the page is parsed by the ASP engine, all of the included scripts are built into the one page to be parsed - so you've got one BIG file being parsed just for some if then statements.
One other solution is to use the server.execute method. Which will include the results of just the file you need. Simple and better preformance. For example:
|
|
#5
|
|||
|
|||
|
I thought it was a more complex question than it actually was.
I'd go with the server.execute method suggested by Catalyst, (so long as your version of IIS supports it - I think its version 4 and above), as ASP is not particularly efficient working with strings and parsing text. |
|
#6
|
|||
|
|||
|
if you have the option of migrating to .NET, then do it. If not, listen to catalyst
|
|
#7
|
||||
|
||||
|
Hi....
I have an extremely efficient way for you to be able to do this. What you are after is a way to skin a site using a templating system which runs of a single file.... no problem. I have a system that is skinnable, has the ability to plug-in ASP modules and will drive any website. Please contact me via msn aspwiz@hotmail.com as it is not something I wish to divuldge to all and sundry.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| 2tier, asp, application |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Integrating Mpp with the .NET Application. | akshitshah | ASP.NET Forum | 0 | Sep 28th, 2007 05:23 |
| 3 tier navigation | Struggling | Web Page Design | 1 | Jan 4th, 2007 16:40 |
| closing an application | kal | JavaScript Forum | 4 | Dec 13th, 2005 13:20 |