Monday, April 24, 2006

Some quick pondering

After a conversation this weekend with a friend, I thought I might post some useful links for those going down a service or component oriented route. I hope these are helpful.

-Microsoft's Enterprise Library for .NET 2.0: The Enterprise Library's latest version is a really wonderful framework for the development of both Applications and Services. In summary it is divided up into six distinct Application blocks designed to cover basic abstraction that are also open source. Some of the most useful blocks are the Data Access Application Block (DAAB) and the Cryptography Application Block (CAB). Look for more and more pieces to be added to this block in the future. Also, if you are looking to develop applications for Oracle and use the DAAB you should read this blog further to see some interesting issues and hiccups you may run into. The DAAB is also great if you need to develop for several databases and need the .NET implementation side to be close to database agnostic. That being said this may be impossible with Oracle due to their seeming inability to work cleaning with a generic implementation.

-ODP.NET and ODT for VS2005: Though still in Beta, this release looks to be feature complete, and reasonably stable enough. Though Microsoft and Oracle will still bicker about smaller details it is still better to use the Oracle provider than the one included with .NET by default. The Oracle implementation is faster, more flexible, and will provide better integration than the standard .NET provider. It is also possible to modify the DAAB to use ODP.NET instead of the default .NET provider. I would also like to mention that the code changes for the DAAB are relatively minor (shouldn't take more than 30 minutes if you know what to change before hand).

-Ingenious MVC: By now all developers should be trying to learn and get used to patterns. One of the most powerful patterns available is the Model-View-Controller (MVC). Though a discussion of that pattern is out of scope for this post, I would strongly encourage reading Chapter 14 of Martin Fowler's "Patterns of Enterprise Application Architecture". It is important to note that MVC is not just for Web Applications, it has plenty of application for rich client applications and should be included at the application form level (i.e. forms have controllers specifically developed for the application they are in, or the purpose they serve, controllers should not be "super-generic" for any/all applications). That being said my friend Kent Boogaart has developed an excellent MVC framework that is extremely straight forward and easy to implement. The base documentation for Ingenious MVC is very good, however it's usage documentation is not yet complete. I would suggest reading the documentation for Microsoft's User Interface Process Application Block (UIPAB) (and here) if you would like further information, however you should not use Microsoft's block as it is going to be replaced in approx. 1 - 2 years for .NET 2.0 and is extremely complicated. You should use Kent's framework instead as it is a simplified version of the UIPAB and is much more clean and consistent. I have full confidence that Kent's Ingenious MVC will be well supported and relevant in the future.

Anyways, that's a good start, and if any of you out there have any questions, please feel free to comment, and I will be happy to respond as I can.

Tuesday, April 18, 2006

Go go Profile Providers!

It was an interesting day yesterday. Got into a discussion about launching UI applications in another thread, and the general concensus was to have events fired from within a worker thread that are caught by the UI then Invoked against the UI thread, doing this to get around having to have a separate message pump. I ended up actually just launching the form in the other thread and refreshing it to update itself (it was just a simple progress bar form). it seemed to work out well, however I think in the future I will follow the other route, especially separating business logic out of the UI layer. Normally I would have done that, however in this particular application I just wanted something quick and simple, which it's working out to be so far.

In other news, I wonder if anyone really will shell out $400 for Vista Premium. Anything over the $200 range seems rediculous to me in particular, however the new pricing scheme has yet to be released officially. Just doesn't seem right to me though.

Also, if you know of anyone looking for an Administrative Assistant, or Data Entry person, paricularly in the psychology field, please let me know ASAP. My wife is currently looking for a job in those fields.

Monday, April 17, 2006

Happy Monday?

Just received word this morning that the source code for the ASP.NET 2.0 provider model has been made available for download. This is great news, especially since I'm just about ready to start on that portion of the project. I have one custom provider and its classes left to do, after which I am off to work on bulding the administrative portion of the site. All of which is rather exciting. Anyways, this is great news.

In other news, I was kicking around ideas for "digital life" over the weekend. Essentially self-compiling, self-replicating, and self-modifiying (based either on programmed choices or a random number or both) code. This idea flew like an elephant with my wife, but I'm interested in getting feedback from others as well.

Friday, April 14, 2006

Happiness is MVC

I must take a moment to send out a congratulations (though a day late) to Kent B. and his release of the new Ingenious MVC. I haven't had the chance to get into it much, I hope it should turn out to be as well conceived as its name. That being said, please support Kent and his hard work. This component should really help out for my current project, especially considering the "mess" that is the UIPAB. I am guessing that, as usual, Microsoft will wait till the last minute for generating something useful in this regard. Disapointing, yes, but the way of the industry.

As far as project progress, the basic Membership converter is complete, and I'm rather proud of that little app if I do say so myself. I'm almost two thirds of the way through the Role Provider, though I would like to use roles to exclude access to certain pages in the site, however the setting up of those rules seems to be relegated to the ASP.NET Configuration utility, which is great if you're running on a Microsoft SQL Server platform, but practically useless in any other context. Needless to say this is a good bit frustrating.

Also I would like to give a hello to anyone coming over to this blog from LiveJournal. It's good to see you here, and I look forward to any comments you may have.

Thursday, April 13, 2006

Semi-colons, and other such stuff.

Another day another Oracle and .NET don't agree moment. This time about semi-colons. Oracle wants them in Oracle, but adds them automatically in .NET. The Microsoft provider for Oracle wants them in .NET. Again, nobody agrees. This makes life frustrating when trying to develop an application. Not a show stopper by any means, but still a pain when there is a lack of consistency. That being said, I finished the Membership Provider yesterday and have moved on to writing a conversion application that will hopefully be basically finished today.

Wednesday, April 12, 2006

Goodmorning Vietna... I mean .NET!

It's another day working on the Membership Provider for my project. I've been having a rather interesting time getting it to do max password tries without requiring a password Question and Answer. I hope I can get away with it in the end. I don't really want or need the Q&A section for this project so I'd rather do without it.

In other news I came up with a somewhat slicker way of dealing with the -1 issue between Oracle and .NET. It's made all of the database code (except in one instance) much more generic. Just create a database, add a command when you need one, add params, and execute. No muss, no fuss. Connections are managed and cleaned up in all cases save dataReaders, and those you just need to dispose of when you're finished. Again, rather straight forward and easy. I'm glad to finally be to this point as it makes database interaction very slick. I have to admit, the DAAB was definitely a good idea. I can only imagine how nice it is when hitting SQL Server 05.

Anyways, enough rambling on that. There's one piece of interesting news, and that's the MSFT Vista delay. I am very disappointed in the execution of the .NET portion when it comes to Vista. There are some excellent articles regarding it by Richard Grimes. This article deals with the amazing disappearance of .NET from Vista, and this article gives a compelling discussion on .NET managed code that is, in fact, repeatable and un-biased. It also shows, I think, why MSFT is crazy to give .NET a smaller role in Vista. Especially considering the impact multi-core processors have on .NET execution performance.

Do you have an opinion? If so, please share it.

Tuesday, April 11, 2006

Decisions, Decisions

After the past two days of Oracle craziness I am most definitely ready to start work on building the site I've designed. The biggest question is whether or not to finish the providers or the data conversions first. To do the data conversion I need to finish the Membership provider at the very least, however I should be able to get some reasonable test data into the new schema for further development. So I'm just deciding that now.

I do currently have a functional version of the DAAB that works on .NET 2.0 with the ODP.NET Beta on Oracle 10g (tested on XE, however it should be just as happy with the full blown version and that's where this particular project's data store will be living) and would be happy to share any help I can with that.

Other than that I'll post more news as I come across things.

Monday, April 10, 2006

SOLVED!

Ahh, the joys of Oracle and .NET and what happens when companies are focused on themselves versus those that use their products.

Anyways, enough philosophical ranting. The solution to all of my Oracle 10g on DAAB problems is shown in this post. It's worth a read if you plan on doing any Oracle work using the DAAB. That being said, they should hopefully have a less painful and more direct work around for the issue instead of me having to recreate every parameter on the likely chance that they had their internal size variable set to zero instead of -1.

So it's on to ASP.NET Providers for me, and possibly looking into converting the security information for several users in the near future. All interesting possibilities indeed.

Let me know if anyone out there in blogger land would like some further information on the issue.

Like Cats and Dogs, Oracle and .NET

All they want to do is fight and disagree. Anyways, Friday turned out to be a royal head-banging session as I tried to figure out why the heck I received an InvalidOperationException every time I tried accessing the members of an OracleDataReader filled from a stored proc. I'm using .NET 2.0 (simple console app for testing), the new ODP.NET beta (the only one that likes ADO.NET 2.0 aparently), a 10g XE install on my machine, and a stored proc. package using out Ref Cursors.

The execution seems to work fine (the data reader actually says it has rows in it) until I try and retrieve any data. Once I access a data member in any way (Get Methods, GetOracle Methods, and Indexes) I receive an "InvalidOperationException: Operation is not valid due to the current state of the object." This is driving me nuts. I've tried to peel back all the object layers I can, but to no avail. I can't seem to find exactly where the problem is.

Now originally I had been using the DAAB (Enterprise Library Data Access Application Block) with the same results, but as per usual I've stripped it down to a single executable running the most basic operation. All simply frustrating.

Anyways, if you happen to have any ideas I'm all ears, otherwise I'm off to the Oracle forums ::shudder:: to see if someone will help.

Friday, April 07, 2006

Macs'R'Us

Well now,

I would say that this is all "interesting," but it's not. John C. Dvorak of PC Magazine (and I've been a big fan of that for years) mentioned something like this happening several months ago. In fact I would be surprised if Apple's direction didn't follow his prediction rather closely. I could go on and on about the Mac vs. IBM-Compatible, Mac vs. PC, Mac vs. Windows debate, but I haven't had that arguement since college and don't plan on starting it up again. The bottom line is, in short, the PC/X86 architecture won the war with Mac and now Steve Jobs will be moving to maximize his market share in products where he is successful.

Alright, now that the flame-bait is done, it's more database work for me today.

Thursday, April 06, 2006

Darn that Business Logic!

Business Logic, Logic Puzzles, Logic Games, Pretzel Logic...

All a whole bunch of fun, but in my particular case it's the Business Logic portion that I'm worried about. Should all or some of the Business Logic be on or off the database? I had this discussion a few years ago, but it's been awhile and I can't remember much of it now.

What do you think?

Is the cost of one select statement round trip from a web server to a database server so much that over time it will decrease efficiency, or is it negligable?

Where should the business logic go?

Oracle, Procedures, Views, Functions, and ASP.NET 2.0

Delving further into my current ASP.NET 2.0 project I've found out that things from a database perspective have the possibility of being very different. After designing the project, doing the major documentation, and walking through a couple of tutorials for the DevExpress ASP.NET 2.0 grid I decided it would be best to start working on implementing the database layer first. Especially considering two factors; A) Oracle doesn't exactly like to work well with .NET (their 10g .NET 2.0 provider is still in Beta) and B) building the project from the ground up makes more sense at this point, not to mention the fact that it will make writing a conversion program for the data a little clearer.

Anyways, I am looking to figure out more information on best practices in ADO.NET 2.0 and some of the changes between the two.

Also, still looking for more MVC information.

Anyways, on the docket for today is further database coding (finishing off the stored procedures) then onto integrating the Data Block from Microsoft's Enterprise Library with the current table structure, at least making sure my recompiled version of the ELDB using Oracle's .NET 2.0 provider beta will communicate with the database properly. From there it's implementing the Membership Provider and getting to a point where I can write a data conversion app.

One interesting thing that came up in my discussions with coworkers recently was the use of Oracle Views and Functions. Essentially the advice came down like this: Views over 1,000 rows perform poorly, simple single "gets" (1 record, 1 column returned) are best done with functions. I found both pieces of input to be useful and extremely interesting. Particularly the views portion. I had been considering using a view but the size of the data returned would be too large to make it efficient, so back to the reliable stored procedure I went, and things have been going well so far.

Alright, back to it!

Wednesday, April 05, 2006

UIPAB Blues

GRR!

I just finished a long post regarding my experiences with the UIPAB and lost it to the void. Anyways, I'll summarize here:

-Microsoft Partner Program suggests UIPAB v. 2.0
-Seems like a good idea after some quick research (navigation, abstraction, state management) so I do a POC
-POC works after some quick schema work.
-Do design of the main ASP.NET 2.0/C# project.
-Finish design.
-Start coding on design.
-After some deep research find out that the UIPAB has been dropped for .NET 2.0 and they are now focusing on the Composite Application Block, and some yet to be written Web Application Block.
-Project can't wait, but is thankfully a modular design so I can replace that portion.
-Team members are uncomfortable using a depreciated component (I am as well).
-See Kent B. showing up quite a bit in UIPAB posts talking about it, mentioning his Ingenious MVC, and generally being helpful.
-Ask Kent to e-mail me his Ingenious MVC.

Finally I am just wondering if anyone has used Ingenious MVC or has any comments/experience regarding the UIPAB.

::whew!::

Welcome to Blogger-land

Well here I am in blogger-land for the first time, and hopefully not for the last. Anyways, I will plan on posting rants and ramblings on .NET architecture, design, and development. Please feel free to comment.