Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Standard Version / Startup idiom on: January 16, 2008, 09:53:20
What's the recommended way of performing startup in a windows application? The way I have been playing around with it, I have the following classes:

:
    class ApplicationRunner
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            IFacade facade = ApplicationFacade.getInstance();
            facade.startup(new Form1());
        }
    }

    class ApplicationFacade : Facade, IFacade
    {
        ...
        public override void startup(object app)
        {
            notifyObservers(ApplicationFacade.APP_STARTUP, app);
            Application.Run(app as Form);
        }
    }

just wondered what other peoples opinions are? Is there really a need to have an ApplicationRunner class? or just put the main method in the ApplicationFacade? Where do you recommend putting Application.Run (the built in .NET thing) in the facade or startup command? What are the Java guys doing?

[Edit: oops forgot some parts]
2  PureMVC Manifold / Standard Version / XML Comments on: January 10, 2008, 12:44:41
I don't mind updating the comments above the methods and classes to be formatted as XML, let me know if this needs to be done and if you want a hand doing it.
3  PureMVC Manifold / Standard Version / .NET versions on: January 10, 2008, 12:37:27
Hiya,

Currently the solution is built with VS.NET 2008 which for some reason doesn't support .NET 1.1. Since none of the .NET 2.0+ specific features are being used, is it worth changing the project to build with VS 2005 and target .NET 1.1 or does Silverlight or something rely on .NET 2.0? (I still haven't looked into anything related with Silverlight yet)

I mainly ask because for the compact framework I really wanted it to target PocketPC 2003 which uses .net 1.1. Do you think we should maybe have different projects for different versions? similar to org.puremvc.as3 / org.puremvc.as2 or do you think that just makes it more complicated than it needs to be?

Anyway, I've got it working fine with the compact framework and .NET 1.1 by changing just one line.

:
org.puremvc.csharp.patterns.facade.facade.cs, line 368

protected static IFacade instance = new Facade();

to

:
org.puremvc.csharp.patterns.facade.facade.cs, line 368

protected static IFacade instance;

Otherwise getInstance always seems to return a Facade, rather than whatever extends it.

I didn't try committing this change because I wasn't sure the exact procedure that was being followed, so posting here seemed to be the safest bet  ;D
Pages: [1]