Wiki Home

_ Exam 70-155 Study Group Log _1999/10/17


Namespace: WIN_COM_API
[Irrelevant material was trimmed]
Session Start: Sun Oct 17 09:42:47 1999 (note: this is MDT!)

[10:03] {Evan Delay} While we are getting warmed up, can I ask a VFP question?

[10:04] {Evan Delay} If we have a n-tier system, we can not do field level validation (either data or business rule) until we submit the record. Do we have to live with this?

[10:05] {Evan Delay} This can make the UI clunky.

[10:05] {nancy} Um, you can do business rule validation...

[10:05] {nancy} So, if you mean literally _field_level...

[10:05] {RoiL} You should also handle some in the UI.

[10:06] {nancy} ...Then Rick's zip code example showed the cascading of validation.

[10:06] {Evan Delay} Roi, I guess that is the trade off, but then we are mixing the levels.

[10:06] {nancy} Roi- In my way of thinking, the UI should handle formatting the display...

[10:06] {Evan Delay} Can we "pass" the biz rules up to the UI?

[10:06] {nancy} ...and hand off the validation to the biz rule.

[10:06] {RoiL} I think that's ok. You want to limit the amount of BAD information you send down the pipe.

[10:06] {nancy} Evan, sure.

[10:07] {Evan Delay} Any examples of this?

[10:07] {nancy} So, your UI could be set to *use* one set of business rules or another (different set classlib to, for ex.)

[10:07] {nancy} ....Um, probably

[10:08] {nancy} ....hang on and I'll see if I can find a specific ref.

[10:10] {RoiL} Evan: In the zip example- The biz rules verify that the zip code falls within the allowed range. The UI should make sure the zip is not some wierd entry.

[10:11] {Evan Delay} John point your browser at Exam70-155StudyGroup

[10:12] {nancy} Evan-Did you look at the download? The one from my site has all the pieces in one project. myDataTier (misnamed). Look at the form: myUserInterfaceForm...

[10:12] {Evan Delay} Royal Roil, so the user still has to click "save" to have it validated. Also they won't get any feedback that the city the entered does not match the zipcode until they save.

[10:13] {nancy} ...look in the cmdOK.click() method...

[10:13] {nancy} You'll see that the form gets a set of business rules attached...

[10:13] {RoiL} Evan: I think you're right. The bizrules have to do the validation.

[10:13] {nancy} ..When you click on the Use Access DB button, the business rules for that backend get swapped...

[10:14] {nancy} So the form just calls a business rule ADD validation...the form doesn't care wich busrule is being used.

[10:15] {Evan Delay} Click to Exam70-155ExampleComComponent

[10:16] {Evan Delay} There is a simple example of a com component that allows you to navigate through a table.

[10:17] {Evan Delay} The important thing is that you must use OLEPUBLIC to expose your class

[10:18] {Evan Delay} Using COM has several benefits as you see listed (maintainability, scalabilty) but this comes at a price of complexity.

[10:18] {Evan Delay} and a loss of speed.

[10:19] {CindyWinegarden} But the loss of speed might be minor compared to other things like long-distance access

[10:19] {Evan Delay} Cindy, yup

[10:19] {JohnFabiani} How much slower than direct access?

[10:19] {Evan Delay} John, don't know it depends on the situation.

[10:20] {Evan Delay} It just does a top, bott, prev, next and refresh.

[10:20] {JohnFabiani} I have discovered that views are very slow with large data set.

[10:20] {Evan Delay} Ohh... and init and destroy.

[10:20] {JohnFabiani} Will com objects behave the same as views?

[10:20] {Evan Delay} The properties of the object contain the current record.

[10:21] {Evan Delay} John they are two different things. A com object can have views in it.

[10:21] {Evan Delay} The COM example I have just happens to deal with data.

[10:22] {JohnFabiani} I understand that the com object will alow other programs to access the data but what about speed.

[10:22] {Evan Delay} From what Craig said last time, the data from the object probably shouldn't be returned through properties like I did, but I think the example still is valid for illustration.

[10:22] {Evan Delay} John, it will be slower than a direct call, how much slower I don't know.

[10:22] {RoiL} Evan: I was just going to mention that. :)

[10:22] {Evan Delay} Direct VFP data access will usually be the fastest.

[10:23] {JohnFabiani} OK is direct access still used in the com object?

[10:23] {RoiL} John: Doesn't have to. The COM could be hitting a SQL db throught odbc.

[10:23] {JohnFabiani} Maybe I should have said allowed in the com object

[10:23] {Evan Delay} John, in my example it is, but in a n-tier system, the data access might not occur until a few more tiers down.

[10:24] {Evan Delay} At the bottom of the page is an example of using the com object in VFP and Excel. Any questions or discussion?

[10:24] {Evan Delay} The reuse of COM is really a key component.

[10:25] {JohnFabiani} Would the speed be better if the com object was written in C or something else last question on speed

[10:25] {RoiL} John: The speed issue is secondary.

[10:25] {nancy} John, the point is to use COM when you need it. IOW, if you can do direct access, than you should.

[10:25] {Evan Delay} John, maybe.

[10:26] {nancy} Since it is not the program execution that is slow (the instructions) I doubt you'd gain anything in speed by using C.

[10:26] {Evan Delay} Single tier is fast to build and execute but it has its limits.

[10:27] {JohnFabiani} Com objects used as the valid object return the info how?

[10:27] {nancy} COM can be used to contain your business logic, or UI logic, or combinations. The point to using COM is if you want to reuse the object in different arenas...

[10:27] {CindyWinegarden} Right. More cross-platform.

[10:28] {RoiL} Right Nancy, COM allows any front-end to access your data.

[10:28] {nancy} ...as Evan's example shows, being able to reuse the person data in Excel or VFP is it's charm. W/o having to rewrite the code (and therefore, introduce versioning problems).

[10:28] {RoiL} or rules.

[10:28] {Evan Delay} It is really powerful.

[10:28] {Evan Delay} Any app that can invoke COM objects can use the data.

[10:28] {Evan Delay} The VB guys will be able to access data quicker.

[10:29] {nancy} Evan-tho' would the client need to have an ODBC data source set up to use it?

[10:29] {DionisioSilvaJunio} I have a lot to learn. I will be attending.

[10:29] {JohnFabiani} The variable = com propery field is that right

[10:29] {CindyWinegarden} Dionisio, I mostly just listen here too!

[10:29] {Evan Delay} Nancy, I don't think so since the data is only access directly by the COM component.

[10:29] {nancy} Dionisio-You're in good company. I think it's true for all of us. Me, anyway, for sure! :)

[10:30] {RoiL} John: In evan's example, the COM object places the field data into it's properties.

[10:30] {Evan Delay} VB doesn't connect directly to the data, therefore no ODBC connection.

[10:31] {Evan Delay} In the Excel example I didn't need to set up an ODBC source to the VFP table.

[10:31] {nancy} Evan- Interesting. I see. Thanks.

[10:31] {Evan Delay} Roi, what should I have done differently with the returning of data from the object?

[10:31] {nancy} Would be interesting to try it on a "virgin" machine.

[10:31] {CindyWinegarden} Not only that, any access to the data is through the "rules" so it prevents other people from putting junk in.

[10:31] {nancy} Cindy, good point.

[10:32] {Evan Delay} That is the beauty of COM, you control completely how the data is accessed.

[10:32] {CindyWinegarden} And everyone calculates "whatever" the same way.

[10:32] {nancy} Evan-I don't remember Craig's point about not using properties. I think it's slower, right? But I gotta admit I love how "natural" it is to do it that way.

[10:32] {Evan Delay} Nancy, you would need to have the VFP runtime on the machine.

[10:32] {JohnFabiani} I assume it's not just one way ?

[10:32] {RoiL} Jim Booth (an exam author :) talks about using methods like 'GetFeildData?(SomeField) or PutFeildData?(SomeField, SomeValue?)

[10:32] {Evan Delay} I have no ODBC connections set up on my machine.

[10:33] {nancy} Roi-But he still stores the info in properties, right?

[10:33] {CindyWinegarden} I don't think you need VFP runtimes with a COM object do you?

[10:33] {RoiL} Nancy: you would only need ODBC if the COM uses it.

[10:33] {Evan Delay} Roi, and this is because (like Craig said) that we shouldn't bind to COM components with MTS.

[10:33] {RoiL} Nancy: No. The method just returns a value.

[10:34] {nancy} :) So he hits the actual data source? That seems slow to me.

[10:34] {RoiL} Jim has a really good white paper on his site that talks about it.

[10:34] {Evan Delay} COM is cool, VB can then have the data speed of VFP. VFP can call a C++ component to work on some graphics processing. Each language is leveraged.

[10:34] {CindyWinegarden} "The best tool for the job"

[10:34] {RoiL} I don't think it's any slower. It's ... just a different way of doing the same thing.

[10:34] {Evan Delay} Nancy, how so? It is the fasted way to hit VFP data?

[10:34] {nancy} And I like the idea of having the entire data object to edit/add/delete/etc before _putting_ or saving in my case, the changes.

[10:35] {nancy} Yes, and he talks about it in his book, too, I believe. It may take me a while to get there. I agree 100% with using get and put methods for accessing the properties...

[10:36] {JohnFabiani} This sounds like to vaildate you need a large case statement?

[10:36] {Evan Delay} I created my COM example to be simple. :-)

[10:36] {nancy} ....but am still stubbornly clinging to using properties to actually store the data...

[10:36] {nancy} John-I'd try to avoid a case statement at all costs.

[10:37] {RoiL} John: you're right.

[10:37] {Evan Delay} Nancy, your question might be a great topic for next time. "Why should't you return data through properties"

[10:37] {RoiL} That's exactly how Jim handles it.

[10:38] {nancy} Roi- you mean with case statements?

[10:38] {RoiL} Yes.

[10:38] {Evan Delay} What do you have against "CASE" statements. Much more clearer than nest IF.

[10:39] {nancy} John-you'll want to look at: http://www.prairienet.org/ita/bizrulesexample.zip and http://www.pixeldustindustries.com/public/myntier.zip

[10:39] {nancy} I'd rather encapsulate the rules.

[10:40] {nancy} But using a case statement, I'm linking basically unrelated things. But then, I think maybe I don't konw what John meant by using a case statement...

[10:40] {nancy} John-can you tell me what you would have in your case statement?

[10:41] {nancy} {I'm gonna go hunt up Jim's white paper, so we have a link...}

[10:41] {RoiL} http://www.jamesbooth.com/n-tier.htm

[10:42] {JohnFabiani} It just seems to me that you would neet as many "encapsulated" rules

[10:42] {Evan Delay} Craig said that when you use MTS your COM components have to be StateLess. In my example has a state (the current record).

[10:42] {JohnFabiani} and it would be just as easy to create a list of cases statements

[10:42] {nancy} John, yeah, but they're all independent...

[10:43] {Evan Delay} Any other questions or comments on my example?

[10:43] {JohnFabiani} Yes that sounds right. But then each must be called and excuted.

[10:43] {nancy} Evan-I'm still very quesy over what's a state. Once you've copied the fields to properties...you don't anylonger care about the state of the table...

[10:43] {Evan Delay} Nancy, I think it is more the state of the component.

[10:44] {nancy} Yes, John. But, again, I think I may not be understanding what you, Evan, and Roi are talking about being in the case statement.

[10:44] {Evan Delay} But I am not exactly sure why it is bad.

[10:44] {nancy} Evan...but any component will have values.

[10:44] {Evan Delay} Nancy, true.

[10:44] {JohnFabiani} the state of the table is lost??????? after each request

[10:44] {Evan Delay} Where are Jim and Craig when you need them.

[10:45] {nancy} Evan, I *think* I understand why stateless is good, but I'm not sure what the diff. btwn stateful, and stateless is.

[10:45] {nancy} Yeah, I know.

[10:45] {Evan Delay} John, in my example the state of the oject and the table are maintained between each call.

[10:45] {nancy} John-the state of the table doesn't matter. When you get ready to write the data to the backend, you go and look up the record (based on key).

[10:46] {nancy} ...it's the same way that views|buffers work (it seems to me).

[10:46] {RoiL} Nancy: When you use PutFldData it will return a value. ie. bad data = -1, bad field = -2, etc... The UI uses a case to find out what happened.

[10:46] {JohnFabiani} But Evan just said it maintained the pointer into the table????

[10:46] {nancy} Once you query a view...the view data is buffered, and you don't really care what state the source table is in.

[10:46] {JohnFabiani} But this is not a view

[10:47] {RoiL} Nancy: The COM object can buffer the data it has also. The COM will have a Revert / Update method as well.

[10:47] {nancy} Roi-Yes, I see. I agree wtih that. The case statement isn't validating the data.

[10:47] {nancy} John-sorry? I don't understand...

[10:48] {JohnFabiani} As I understand it the example makes direct calls. Evan said the state is maintained????

[10:49] {nancy} I'm not talking about Evan's example...After all, it's an example of making a com object in VFP...not necessarily of the perfect way of implementating a data com object. :)

[10:49] {Evan Delay} John in my example it is. You can cut and paste the example and run it with Excel. The state won't be mainted with different invoking clients though.

[10:49] {Evan Delay} Nancy, exactly.

[10:49] {JohnFabiani} Which brings up the next questions - How long will the state be maintained

[10:49] {nancy} All I was saying above is that a com object that stores field data in properties is (maybe) stateless.

[10:50] {Evan Delay} John the state (in my example) will be maintained until the object is released.

[10:50] {nancy} As I understand it...:-( I really really really wish some of the others were here.

[10:50] {JohnFabiani} Will it maintain as long as I have the com open?

[10:50] {Evan Delay} John yes (in my example).

[10:51] {JohnFabiani} Great!

[10:51] {Evan Delay} In a few more meetings we will cover COM in more detail.

[10:51] {Evan Delay} Whew!

[10:52] {JohnFabiani} Does each prgram that call the com get the data (just as in set excl off)

[10:52] {nancy} Yep. Evan, it's a good start. Helpful to me.

[10:53] {RoiL} Nancy: Back to the CASE. The business object can have a case statement build into to validate the data that the UI sends to it. Example: RULE: No orders over $10,000. The case makes sure that the passed data meets that requirement.

[10:54] {nancy} Here is one link: http://www.jamesbooth.com/n-tier.htm

[10:54] {nancy} I'll add it to the n-tier portion...somewhere. :-)

[10:57] {nancy} I'm trying to make the zipcode example use MTS, but I'm very stuck on details...so I don't have anthing there.

[10:59] {nancy} Let's see...Mike was supposed to lead off today with his menu topic...

[10:59] {RoiL} In Jim' book. 'Effective Techniques', he lays out the whole business object. All the code everything.

[11:01] {nancy} Well, we could talk about adding code to the form events...

[11:02] {nancy} before we get too far from the user services section...

[11:02] {JohnFabiani} I'd like to tackle nancy's question on the case statement.

[11:02] {RoiL} Just a note. We keep mixing COM and business objects. They're not really the same thing. COM is a way to implement the busobject.

[11:02] {DionisioSilvaJunio} Nancy, Very Good !

[11:04] {JohnFabiani} We mix com and bis-obj because we want to use com to control data input

[11:05] {JohnFabiani} I mean imput (replace/insert) into the tables

[11:05] {RoiL} Right John, but you can implement bus rules as a simple class in a single or 2 tier app without using com.

[11:06] {JohnFabiani} Right but I'd like to have a way to setup com's to allow report writing or selective data input

[11:06] {nancy} All COM does is package up class libraries. (at a really simplistic level)...So anything that can be in a library can be a COM object.

[11:08] {JohnFabiani} Right nancy but our job is getting the dtails right

[11:09] {nancy} John, my point is that if you get the class design right for handling your data, then making into COM is a diff. issue.

[11:09] {nancy} COM itself doesn't have anyting to do with logic, or data, or whatever...

[11:10] {RoiL} COM is really about providing a Public interface to objects that any development language can access. ie. Excel in Evan's example.

[11:10] {JohnFabiani} I was thinking about things like how register the com and how to make it an effect tool for reporting.

[11:11] {ErikMoore} How would COM be a reporting tool?

[11:12] {CindyWinegarden} A COM object could calculate things in a certian way for reports.

[11:12] {JohnFabiani} i.e. the excel program from evan's example.

[11:13] {Evan Delay} Erik the example is at http://fox.wikis.com/wc.dll?wiki~Exam70-155ExampleComComponent

[11:14] {RoiL} A COM can be compiled as a .exe or .dll right?

[11:14] {ErikMoore} Yup

[11:14] {RoiL} Why choose one or the other?

[11:14] {ErikMoore} DCOM, exe only.

[11:14] {ErikMoore} dll faster, but takes client down with it if it crashes

[11:15] {RoiL} Erik: As I understand it, DCOM is physically moving the COM object down the pipe to client end?

[11:15] {ErikMoore} DCOM, is COM running on another machine. period...

[11:15] {ErikMoore} To implement, the server has tobe registered on both machines though

[11:15] {RoiL} Ah. So it could be on a different server.

[11:16] {ErikMoore} If its not, it's not DCOM.

[11:16] {RoiL} Do we have to do anything special to create a DCOM component?

[11:16] {ErikMoore} Creating it is just like creating a COM component....

[11:17] {ErikMoore} Implementing it (registering, security etc..) is a pain

[11:17] {JohnFabiani} Do register DCOM the same way?

[11:17] {ErikMoore} No, there's more involved.

[11:17] {nancy} Plus-DLL = no user interface. AT ALL.

[11:18] {ErikMoore} Exes allow it, but it's still not a good idea.

[11:20] {RoiL} Erik: Is there a term for moving a component to the client. Like in IE when you get the "Would you like to download and install ...blah... signed by MS"?

[11:20] {ErikMoore} That's just a script in an HTML page calling for acertain ActiveX control...

[11:21] {ErikMoore} IE's ActiveX implementation allows the page author to specify a ProgID and URL for a ActiveX control to be automatically downloaded from

[11:21] {ErikMoore} That's NOT DCOM.

[11:22] {JohnFabiani} So when starting the DCOM - how is it called?

[11:22] {ErikMoore} CREATEOBJECTEX()

[11:23] {ErikMoore} Just like CREATEOBJECT(), but second parameter is remote computer name

[11:23] {Evan Delay} Is there no difference in the way we write the classes for COM vs DCOM.

[11:23] {ErikMoore} No. They're the same. The only difference is the registration process.

[11:24] {JohnFabiani} Where does one find out how to register a DCOM

[11:24] {ErikMoore} In some cases, you might need to consider that a DCOM object is pipingdata through the line...

[11:24] {Evan Delay} Cool.

[11:24] {ErikMoore} so you need to consider bandwidth usage, but this is usually not an issue with well designed servers..

[11:25] {Evan Delay} Erik, what do you know about COM objects having to be "stateless"?

[11:25] {JohnFabiani} How would the bandwidth be different that the standard requirements of FOX

[11:25] {ErikMoore} John- VFP help on COM I think has some details. Haven't checked for a while, but I think Rick also has an article that tells some.

[11:26] {ErikMoore} Evan- stateless is just required to run inside MTS, because your object might be used by two different clients consecutively

[11:27] {ErikMoore} John- you would just want to make sure that a DCOM server is not returning a ton of data, or te network will slow the program down.

[11:27] {Evan Delay} Erik so it is a good idea to make a COM object stateless in case we use MTS to deployit.

[11:27] {ErikMoore} Whereas the same server as just a COM object is local, so bandwidth is not really a consideration.

[11:27] {ErikMoore} Evan- it depends...

[11:28] {RoiL} What is the definition of stateless?

[11:28] {ErikMoore} But, IMHO, stateless is a good idea anyway.

[11:28] {JohnFabiani} If you make it stateless you have the over head of open and closing the table Yes????

[11:28] {Evan Delay} Erik, would you say this COM object has a state? http://fox.wikis.com/wc.dll?wiki~Exam70-155ExampleComComponent

[11:29] {ErikMoore} Roi- stateless means that on any given call to a server, the server has all the information it needs to carry out the entire process...

[11:29] {nancy} Erik-We were talking before about using a class that copies data from a record into properties. Then Evan made that into a COM object (as an ex.)...

[11:29] {Evan Delay} Since it allows the use of GoNext without giving the current record

[11:29] {ErikMoore} without depending on proprety settings or any other global variable that another process could have set previously.

[11:30] {nancy} So we were wondering if the com object (corresponding to a data object) is stateless.

[11:30] {RoiL} Ok Erik. got it.

[11:30] {nancy} INFORMAL POLL! How many of us are planning on taking the beta exam?

[11:30] {ErikMoore} If it copies the the values to its own properties, no, it;s not. A stateless object would populate the properties of another object and return that object- like a recordset.

[11:31] {nancy} Since one of our ulterior motives is to show a great turnout...I'd like to just keep focusing us on that particular goal.

[11:32] {ErikMoore} Evan- the problem with that implementation is that, your process calls a method, and in a subsequent line of code, checks some property, but in that time, another process could have reset the properties.

[11:33] {nancy} How might we really spread the word? I suspect it's VERY important to to have a good showing for VFP.

[11:33] {RoiL} Erik: We were talking earlier about using PutFldData / GetFldData in Evan's example. Would that turn it into stateless?

[11:33] {nancy} Outside of our community we are viewed as cranks, and I think it's our own damned fault, frankly.

[11:33] {CindyWinegarden} The word has been spread, but it probably needs to be re-announced about once a week

[11:33] {ErikMoore} Evan, another alternative would be to have your object build an XML document and return it as a string.

[11:34] {RobinHahn} [email protected] - and thanks, Nancy!

[11:34] {CindyWinegarden} on the lists, UT, MS NG's, etc.

[11:35] {Evan Delay} Erik ahhh or an ADO record set...

[11:35] {nancy} Roi-Interesting. Did you read Rox's post on the Wiki about why she's going to take it?

[11:36] {nancy} Roi-Interesting, Just studying is making me a better programmer, which will help me professionally.

[11:37] {Evan Delay} Erik any other insights in to that example?

[11:38] {nancy} I think it's worthwhile even if you don't pass.

[11:38] {RoiL} Taking the exam shows our commitment to our chosen product.

[11:38] {nancy} Because, just taking the Beta will give you an excellent foundation for passing the "final" exam.

[11:38] {ErikMoore} Evan- is there a downloadable sample, or is the link I am looking at showing all the code? I didn't see the GetFldData and PutFldData methods...

[11:38] {nancy} And because if we don't get a good turnout for the beta, maybe we won't even see a final.

[11:39] {JohnFabiani} How does one get to take the beta test?

[11:39] {Evan Delay} I will do some reading and update the example.

[11:39] {RoiL} Sorry Erik. Those aren't in there. We were talking about adding them. A GetFldData method just return the field contents.

[11:39] {Bonnie} Yes, Nancy ... there definitely needs to be a good turnout for the beta or MS will drop the whole thing.

[11:40] {Evan Delay} John sign up for it at Sylvan went it is announced.

[11:40] {ErikMoore} Evan- your sample is great for using in a non MTS environment. Stateless takes a little more work to implement, so both strategies have their place.

[11:41] {nancy} The beta exam will be Looooong. I think from that they cull the best questions...

[11:41] {nancy} If they don't get enough people to take it to get a good statistical sample, there won't be much point in going on with a final.

[11:41] {nancy} This is all supposition on my part...

[11:41] {JohnFabiani} Is "MTS" terminal server or from SQL 7.0?

[11:42] {nancy} But, since MS put the exam team in at DEVCON in Palm Springs, I got a sense of just how much money it costs them to dev. an exam.

[11:42] {ErikMoore} Microsoft Transaction Server

[11:42] {CindyWinegarden} Not only that, they will think "Why have an exam that no-one will take?"

[11:42] {Bonnie} Nancy ... I've heard rumors to that effect ...

[11:42] {nancy} {/off soapbox}

[11:42] {nancy} John, we talked about that last session a bit.

[11:43] {nancy} A question came up about exactly where you get it to install it...

[11:43] {nancy} I've been fiddling around with that...

[11:43] {ErikMoore} It comes with the NT option pack ,and with Win2K

[11:43] {nancy} Found it on my MSDN subscription CD for NT 4.0 Enterprise Server.

[11:43] {nancy} Erik-when I put in my NT option pack, I just got PWS installation..

[11:43] {Bonnie} Only NT? What about Win98?

[11:43] {nancy} Also, supposedly it comes with MSDE.

[11:44] {ErikMoore} I don't think it will run on Win98 (don't quote me). But what;s the point? IT's server software anyway.

[11:44] {nancy} Bonnie-you can use it with Win98, but it doesn't come with W98.

[11:44] {ErikMoore} Nancy- it does run under Win98?

[11:45] {nancy} Erik-welllll, supposedly from the last session, someone said it might.

[11:45] {ErikMoore} I didn't think it would because of the security model differences.

[11:45] {Bonnie} Just for testing purposes Erik .. I personally don't have NT on my PC's.

[11:45] {Evan Delay} Do we have the "stateless" question solved or should I still post it on the UT?

[11:45] {nancy} But, I'm very unclear on it, which is why I'm trying to actually try it out.

[11:45] {RoiL} MTS requires NT security doesn't it.

[11:45] {nancy} Evan, I think a post never hurts.

[11:45] {ErikMoore} What questions do you still have, Evan?

[11:46] {ErikMoore} Bonnie- tsk, tsk. YOu really should. It makes development so much nicer...

[11:46] {Evan Delay} Erik, nothing specific just maybe a discussion so that a wiki topic can be built on the subject.

[11:46] {JohnFabiani} I think the question is answered. Your example has a state but to use MTS it must not.

[11:46] {nancy} I wouldnt mind if we summarized what we've learned about stateful and stateless on the Wiki topics. I'm sure we're not the only ones confused.

[11:46] {Evan Delay} Nancy, good idea.

[11:47] {ErikMoore} Here is a straight skinny:

[11:47] {ErikMoore} A stateless request requires enough parameters to tell the server exactly what to do in one method call...

[11:48] {Bonnie} Erik ... I may get another box one of these days .. I'll get NT then maybe.

[11:48] {ErikMoore} so a data request might look like oServer.GetMember(10101)

[11:48] {nancy} In our case, the COM object = the Server, yes?

[11:49] {ErikMoore} where 10101 is te PK for the member. The server would then return all required information about the member from that method call....

[11:49] {nancy} I *wish* I had NT, have been trying to install W2K

[11:49] {ErikMoore} If the request is only for a single value, you might use: oSErver.GetMember(10101, "Name")

[11:49] {JohnFabiani} Would it be returned in a HTML file or properties?

[11:49] {Evan Delay} Erik, you call would be more like lcXmlData = oServer.GetMember(1322)

[11:50] {ErikMoore} The key thing is that the pk is included with EVERY SINGLE REQUEST.

[11:50] {ErikMoore} Evan, yes.

[11:50] {JohnFabiani} I got the primary key but what is the return

[11:50] {ErikMoore} For an update request, you need to include all of the data in the method call:

[11:50] {Evan Delay} The fields and the data they contain.

[11:50] {nancy} Or, oServer.GetMember(10101, oData )

[11:51] {ErikMoore} oServer.AddMember("Erik", "Moore", "Race Car Driver")

[11:51] {ErikMoore} oServer.UpdateMember(10101, "Erik", "Moore", "Stunt Pilot")

[11:51] {ErikMoore} John:

[11:51] {Evan Delay} Erik what about my call to the object vs the one Nancy did?

[11:52] {nancy} Evan, I'd change mine to oData = oServer.GetMember(10101)

[11:52] {ErikMoore} The return is just an implementation choice... the server might return a delimeted string of values, an ADO recordset, or an XML document.

[11:52] {nancy} Get member would would use Scatter TO an object.

[11:53] {nancy} You could have an oReturnType...

[11:53] {ErikMoore} Nancy, do you mean to pass on object to be populated? I would usually say oData = oServer.GetMember(10101)

[11:53] {nancy} Right, I agree, and corrected that.

[11:53] {ErikMoore} OIC.

[11:53] {nancy} :-)

[11:54] {ErikMoore} Does everyone have a better idea of what stateless requires?

[11:54] {RoiL} Erik: the AddMember would return the new PK or error code if unsuccessful right.

[11:54] {nancy} Oooh. I am searching for stateful on the WikiWikiWeb (c2.com) and found this:

[11:55] {nancy} MTS objects can be stateful. What they can't do is maintain state across transaction boundaries. This is to maintain the consistency of transactions. In particular this means you don't have to deactivate objects between every method call as some Microsoft publications might have you believe. -- FabianLeGayBrereton

[11:55] {ErikMoore} Roi, that would be an excellent impl choice.

[11:55] {nancy} Roi-Yes, absolutely.

[11:55] {RoiL} Cool. I'm think I'm getting it.

[11:55] {ErikMoore} Nancy- it depends on how they are used...

[11:55] {nancy} This kinda begs the question though...it seems like you have to tableupdate after every row change.

[11:56] {nancy} Erik-Yeah, I hadn't processed the info yet...interesting and provocative, tho'

[11:56] {ErikMoore} Nancy- yes. But you don't really use buffering like you would in a normal VFP app.

[11:56] {nancy} Erik-IC. Thanks. Ithink that is a point of confusion for me.

[11:57] {ErikMoore} By the time the data is going to the server, you are committing it, so a TABLEDATE is implied...

[11:57] {ErikMoore} "Buffering", is handled on hte client.

[11:57] {Evan Delay} I can't wait until n-tier programming becomes visual. Using n-tier feels like we are taking a big step backwards in terms of RAD.

[11:58] {RoiL} I'm still unclear on handling 1-}many relationships. Would the GetMemember return something like a joined recordset?

[11:58] {ErikMoore} The data is inherently buffered, because it is so disconnected from the server.

[11:59] {ErikMoore} Roi- think of it like a p-view that returns all of the invoices for a customer...

[11:59] {ErikMoore} Instead of returning data for a single record, the server returns a ADO RS or XML doc with several rows.

[11:59] {nancy} Yes, that's been really crucial for my understanding of n-tier...thinking of logical data sets instead of physical data sets.

[11:59] {JohnFabiani} Would the returing object hold all the invoices for the customer

[12:00] {nancy} John-depends.

[12:00] {ErikMoore} John: yup.

[12:00] {nancy} If they have thousands and some quite old, it might not make sense to return all of them.

[12:00] {ErikMoore} Nancy- if that's what the request was for...

[12:00] {nancy} Erik-Right. I think it's a matter of design. And to minimize network traffic...

[12:01] {ErikMoore} but this could change with different implementations. The request might be for a list of invoice PKs for a single customer's invoices, and then the client could handle one invoice at a time...

[12:01] {nancy} We probably would want to consider having some kind of limit.

[12:01] {JohnFabiani} Now that the object has the invoices what might be it's structure and how do address the items collection

[12:01] {nancy} Right. Or you could return a summary for all invoices, and let the client zero-in on the one(s) they want.

[12:02] {ErikMoore} John- let's say the we have a oMember.GetInvoices() method that takes a member PK as a parameter.

[12:02] {nancy} John-then you might have an INVOICES object that has a collections property for the ea. invoice.

[12:03] {ErikMoore} oMember.GetInvoices(10101) would return an ADO recordset with a row for every invoice for that customer.

[12:03] {RobinHahn} As in, sending multiple sequential requests....

[12:03] {RoiL} Erik: So if the back-end has 2 tables - InvoiceHeads and InvoiceLines - the returning recordset includes them joined?

[12:04] {ErikMoore} Again, that is an implementation choice.

[12:07] {JohnFabiani} Usng com in a stateless way requires new thinking (and it sounds slow). I'll do a little more reading

[12:07] {MikeHelland} Nope

[12:07] {MikeHelland} Erik, did you ever get that OO Data Mgr stuff, was it pretty weak?

[12:08] {Carl} RioL: In specking a the web part of an app, I made a point that "info sent to the browser will be small chunks, not more than a person can read over in a few minutes. " I think this concept helps determine what gets asked for in the way of a query.

Session Close: Sun Oct 17 12:12:16 1999


Contributors: CindyWinegarden, NancyFolsom

See also: Exam70-155StudyGroupSummaries

CategoryExam70-155StudyGroup
( Topic last updated: 1999.11.13 11:59:41 PM )