Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Hi all!

    I'd like to introduce myself in this forum first. The name is Henrik, and I've been doing some designs for about 3-4 years now. During this time I've always used ASP and nowadays I've been using ASP .Net with C#.

    I must say that it has been very nice to develope with ASP, but now it seems like ASP .Net is growing towards some big lump of information which isn't really any good at anything. Of course they talk some about security and optimisation and how good it will be, but it doesn't seem to exist any tutorials about the subjects. Either it's for the progamming language or it's for Visual Basic .Net which just is too terrifying for me to read. (I mean VISUAL BASIC!)

    For example. A couple of days ago I borrowed a book from my library about C# .Net which I thought would help me with the web designing I do. It turned out to be a book about the programming language C# in Windows. I.e. one OS only and only 3 chapers out of 30 on web developing. At least it was something, I thought, and tried to do one example. The tricky part is that the book assumes you use visual studio 2002 (costs money), hence not writing out all the code, but assuming that the code is there.
    After doing one of the book's examples it just didn't work. This is the stupid error I got:

    ______________________________________________
    Server Error in '/lol/WebSites/WebSite1' Application.
    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0115: 'ASP.LoginForm_aspx.FrameworkInitialize()': no suitable method found to override

    Source Error:

    [No relevant source lines]


    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temp orary ASP.NET Files\lol_websites_website1\6899acdb\ec362f72\acfn z-qo.0.cs Line: 410


    Show Detailed Compiler Output:

    C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\csc .exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System\
    2.0.3600.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.
    Drawing\2.0.3600.0__b03f5f7f11d50a3a\
    System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\
    2.0.3600.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly
    \GAC_MSIL\System.Web\
    2.0.3600.0__b03f5f7f11d50a3a\System.Web.
    dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\m scorlib.dll" /R:"C:\WINDOWS\assembly\
    GAC_MSIL\System.Xml\
    2.0.3600.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices\2.0.3600.0__b03f5f7f11d50a3a\
    System.EnterpriseServices.dll" /
    R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Service s\
    2.0.3600.0__b03f5f7f11d50a3a\
    System.Web.Services.dll" /R:"C:\WINDOWS\
    assembly\GAC_MSIL\System.Web.Mobile\2.0.3600.0__b0 3f5f7f11d50a3a\
    System.Web.Mobile.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\T emporary ASP.NET Files\lol_websites_website1\6899acdb\ec362f72\icmy 3yrx.dll" /
    out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607 \Temporary ASP.NET Files\lol_websites_website1\
    6899acdb\ec362f72\acfnz-qo.dll" /debug- /optimize+ /warnaserror /w:1 /nowarn:1659
    "C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Tem porary ASP.NET Files\lol_websites_website1\
    6899acdb\ec362f72\
    acfnz-qo.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607
    \Temporary ASP.NET Files\
    lol_websites_website1\6899acdb\ec362f72\acfnz-qo.1.cs"


    Microsoft (R) Visual C# .NET Compiler version 8.00.40607.42
    for Microsoft (R) Windows (R) .NET Framework version 2.0.40607
    Copyright (C) Microsoft Corporation 2001-2003. All rights
    reserved.

    c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\Temp orary ASP.NET
    Files\lol_websites_website1\6899acdb\ec362f72\acfn z-qo.0.cs
    (410,33): error CS0115: 'ASP.LoginForm_aspx.FrameworkInitialize
    ()': no suitable method found to override
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\
    Temporary ASP.NET Files\lol_websites_website1\6899acdb\
    ec362f72\acfnz-qo.0.cs(417,29): error CS0115: 'ASP.LoginForm_aspx.GetTypeHashCode()': no suitable
    method found to override



    Version Information: Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42

    _________________________

    It said there were no relevant source lines! The how can I fix the problem? This happened just 5 minutes ago.

    What I try to do is to implement a CMS on a website I'm making for a client. They should be able to easily update the content on the web site without using any other software than their browser. I've tried this in ASP .Net but it seems like it's all geared towards microsoft. Follow their examples and you'll be fine. Plus there are no examples or code snippets to find about this - not really any!
    (I could add that my IE browser just stopped working, now only Firefox works, which is kinda strange concidering I didn't change any settings at all!)

    Also the ASP .Net platform requires a very good server to be able to handle severe load. This is because it's very unoptimized, using windows as server. I'm for open source, so why not set up a server with linux which actually doesn't become slow when stressed? Why did for example the ASP .Net management console start to use 50 % CPU when I just viewed it? That's what I call a progmatic error.

    Searching the web for '"ASP .NET" login C# database' doesn't really return anything. However, after 3 minutes of searching I found this really nice article on the web, for free:
    http://www.sitepoint.com/article/php-mysql-tutorial/2

    Very sleek in my opinion.

    So now I'm thinking of migrating to PHP, setting up a little Apache server which can run my pages, and finally implementing the stuff I need.

    Is really PHP as good as I hear? Is it more optimised? Can PHP create tables as in a guestbook without using spagetthi code, as ASP .Net can?
    Can you use codebehind in PHP - i.e. separating the code from the content? Compiling the PHP code into DLLs for faster execution at runtime? Can chache be used to further speed things up?

    Spagetthi code example:
    <? while (!rs.EOF) { ?>
    HTML code
    <? server-code ?>
    HTML code
    }?>
    ________

    So what do you think? Should I do the transfer, including all the time needed to learn yet another language?

  2.  

  3. #2
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    Well I don't know about all of that specific stuff you listed, but I do think you should transfer.. CSS is the easier language to learn and it has great database support and it fits in with the HTML code...I think it runs fast .. faster if you have it on Linux.. but I don't know what the difference is between PHP and ASP... I'm pretty sure PHP is the industry standard.. What's best is that the language is nearly identical to c++ so if you know that the transfer couldn't be any easier... Also PHP.NET has a GREAT source to learn from because its all open source and there are many developers... There is so much knowledge spread throughout the internet that you could get most anything you wanted done just by browsing tutorials...
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Why would you want to create tables through script? Any sort of table you use (guestbook in your example) would be of a permanent nature, not something you would temporarily create through a script. If you need temporary storage, you can always write to a flat file.

    Anyways, you can create tables (temporary ones) through PHP, and the latest library that follows PHP 5.0 and above, also supports the more sophisticated functions of MySQL 4.1 and above (the mysqli_ library).

    PHP was originally conceived as a pure webserver language, and is hence optimized towards that use.
    PHP 5.0 and later is fully object oriented (contrary to the preceeding versions), and has some major improvements made to it's core with regard to memory handling and internal architecture. (faster than ever)

    To the best of my knowledge, C# as a web service is also parsed at runtime but works as an intermediary language towards CLR, which at least theoretically should make it parse slower than PHP. If you have any severly extensive algorithms to execute, you would run a precompiled applet, which can be just as easily incorporated through PHP as with other languages.

    PHP has a HUGE userbase, and a large base of skilled/seasoned developers, meaning the language is evolving quickly. Same applies to MySQL.

    I think you'll find them a pair that fullfills your needs.
    S. Rosland

  5. #4
    Senior Member echoSwe's Avatar
    Join Date
    May 2004
    Posts
    332
    Member #
    5926
    Hi again, and thanks for the answers.

    Rosland - that was what I was after. It's true that ASP .Net works towards common language routine, but that's only if it detects a change in the actual file. If there is no change (and one user has already fetched the file from the server) then the file is cached and doesn't have to be compiled once more against CLR.
    You can also compile them for even faster execution and to protect your code, but it seems like PHP also can do this.

    About industry standard I'd say there are kinda equal, although PHP has a larger userdatabase. That's also the reason I'm thinking of transferring.

    The table topic I discussed was kinda about the spagetthi code, too. I ment HTML tables, such as the <table> element. As you can see by the code example I wrote, guestbooks and forum posts can be looped though until the colomn has reached end of file. This is how you did it in ASP 3.0, and as I've seen some similarities between the two I was wondering.
    ASP .Net has a separate control to handle this.

    Does anyone know anything about separating the HTML from the Server-script? (codebehind)

    //Henke

  6. #5
    Senior Member visualAd's Avatar
    Join Date
    Jan 2003
    Location
    Slough, UK
    Posts
    201
    Member #
    434
    PHP, being an embedded scripting language, like ASP, is deigned to allow you to have PHP code inside our HTML. I just wrote this for photo album application:
    PHP Code:
            <?php while ($picture mysql_fetch_assoc($result)): ?>
                <?php if ($counter $per_row == 1): // first picture on row ?>
                    <tr>
                <?php endif; ?>
                        <td>
                            <table>
                                <tr>
                                    <td><?php echo(htmlspecialchars($picture['PictureName'])) ?></td>
                                </tr>
                                <tr>
                                    <td>
                                        <img 
                                        height="100" width="100"
                                        src="<?php link_self("action=viewpicture&viewpicture=small&pictureid={$picture['PictureId']}"?>" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                <?php if ($counter $per_row == 0): ?>
                    </tr>
                <?php endif; ?>
            <?php $counter++; endwhile; ?>
            </table>
        <?php endif; ?>
    Some may say that this method looks messy, but for it makes it clearer.

    When I write a PHP application I like to be able to separate the main application from the appllications output, in effect separate the working code from the code which formats the output.

    This is quite a complex task but it has obvious benifits and kind of makes the whole application fit together nicely, more importatntly if you want to add or remove functionality all you need to do is plug or un plug a specific module. This is where you'll probably find the OOP in PHP 5 useful.

    In general though I use output buffering and only output HTML in certain functions. You can then separate all the output functions into one include file and all the processing functions such as those which get data from a database into another.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com