ASP.NET 2.0 question on Partial Types with J.I.T.

G

Guest

Ok, 3rd or is it the 4th time I have asked this question on Partial Types,
so, since it seems to me that Partial Types is still in the design or
development stages at Microsoft, I am going to ask it differently.


FOUR QUESTIONS:
The background:

I got three (3) files

(1) Untitled.aspx
(2) Untitled.aspx.1.cs
(3) Untitled.aspx.2.cs

QUESTION #1:
How would you design Partial Types for ASP.NET 2.0 web pages and what SYNTAX
should go in the Page Directive of Untitled.aspx so that is can easily by
J.I.T.ed when you first bring the page up in IE?

QUESTION #2
Would you name every file of the partial type in this page directive?

QUESTION #3
Would you name file #2 and #3 above differently?

QUESTION #4
And what difficulties could one expect when starting at the very bottom in
designing and architecting partial types?









REPOST BELOW
---------------------------------------------------------
I got three (3) files

(1) Untitled.aspx
(2) Untitled.aspx.1.cs
(3) Untitled.aspx.2.cs

These three files must be used together to make file #1, Untitled.aspx, page
work via
J.I.T. when the User first hits Internet Explorer 6.0 on your browser.


MY QUESTION to the Microsoft ASP.NET and C# teams.

I know how file #2,Untitled.aspx.1.cs, is connected and can be found by file
#1, the Untitled.aspx page.
How does file #3, Untitled.aspx.2.cs, get found by the file #1 when I the
first time with Internet Explorer?

IN OTHER WORDS, I am NOT using pre-compile for VS.NET to make these file
compile together.
I would be just using J.I.T. compiling like you do now with src= attribute
in a ASP.NET page.
 
A

Alvin Bruney

I see confusion in your question. Partial types do not emphasize aspx files,
it's just a consequence. The real meat here is that the defining methods are
allowed to exist elsewhere instead of with the initial type definition -
something I've complained about for a while now. The effect is that code
becomes more readable and easier to deal with.
How would you design Partial Types for ASP.NET 2.0 web pages and what SYNTAX
should go in the Page Directive of Untitled.aspx so that is can easily by
J.I.T.ed when you first bring the page up in IE?

There's no design issue involved here. At run-time when your type is
instantiated, the CLR will collect the individual pieces and put them
together. Jitting will be no more or less difficult because all these
entities already belong to the same namespace anyway.

I don't see a design issue if your architecture focusses on objects and how
they relate to each other (OOP). A type would not change, it's
implementation would not change. Some of it's methods will not be in the
same source file and others will, but how would that affect the
architecture? Design should not focus on where definitions are at - this is
functional decomposition of sorts. It's not OOP. OOP focuses on how these
objects relate to their environment. Remember, architecture is a very high
level view of how the system is put together. You are unnecessarily mixing
this upper level view with a very low level source code detail.
 
B

Bob Lehmann

Careful!

OOP is a four-letter word, as far as nospam is concerned. His caps-lock key
will probably now sporadically engage while he explains how OOP and n-tier
development have failed.

Bob Lehmann
 
J

Jay B. Harlow [MVP - Outlook]

nospam,
Based on a similar question from "curious" in the Whidbey newsgroups

http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slcid=us

I understand that you cannot use 3 files for partial types in ASP.NET, only
two are supported.

Only reason I remember it was "curious" is the question sounded so very
close to your question, I was thinking "curious" was you, and you were
asking over there, as you are not getting the answer you want over here.

Hope this helps
Jay
 
E

Eric Newton

I was thinking the same thing, Jay...

"Curious" or "nospam"...
Partial types are simply a way to define a class spread out over a couple of
files. One file is analagous to a C source file while the other could be
considered like a C header file that is "#include"-ed from the C source
file. During compilation, the two files merge and you get one type.


--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
(e-mail address removed)-software.com [remove the first "CC."]
 
G

Guest

There is no one on those newsgroups anyway....


Eric Newton said:
I was thinking the same thing, Jay...

"Curious" or "nospam"...
Partial types are simply a way to define a class spread out over a couple of
files. One file is analagous to a C source file while the other could be
considered like a C header file that is "#include"-ed from the C source
file. During compilation, the two files merge and you get one type.


--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
(e-mail address removed)-software.com [remove the first "CC."]


Jay B. Harlow said:
nospam,
Based on a similar question from "curious" in the Whidbey newsgroups
http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slcid=us
I understand that you cannot use 3 files for partial types in ASP.NET, only
two are supported.

Only reason I remember it was "curious" is the question sounded so very
close to your question, I was thinking "curious" was you, and you were
asking over there, as you are not getting the answer you want over here.

Hope this helps
Jay
bottom
 
G

Guest

*Hypothetically*, if you COULD do 2 pages, how would you answer the
questions below...

QUESTION #1:
How would you design Partial Types for ASP.NET 2.0 web pages and what SYNTAX
should go in the Page Directive of Untitled.aspx so that is can easily by
J.I.T.ed when you first bring the page up in IE?

QUESTION #2
Would you name every file of the partial type in this page directive?

QUESTION #3
Would you name file #2 and #3 above differently?

QUESTION #4
And what difficulties could one expect when starting at the very bottom in
designing and architecting partial types?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top