SlavoF's WebLog

A Humble Addition to .NET Weblogsphere

February 2003 - Posts

How evil am I?

How evil are you?

Found via Jason Bock

Is ASP.NET too complex? It depends.

Ben Coverston wrote:

Don’t get me wrong, I really like ASP.NET, but I think it has some serious problems.  Brad Wilson mentioned that he had some issues with ASP.NET, and while he did not go into details, I would like to expound a little on what I have seen, what I like, and what I don't like.  My biggest problems with ASP.NET stem from what I perceive are barriers of entry for allot of developers.  Many developers coming to .NET for the first time are reformed VB developers, or new to development entirely.  They need a system that they can understand quickly and use easily.
...

So what is my complaint?  If Microsoft wants us to build multi-tier applications and have good separation of the data layer, the business layer, and the presentation layer, please give us design patterns, or better, a fleshed out framework that we can work in.  When I build applications, I want to feel like I am writing the application, not fighting the development environment.  All too often when doing something in ASP.NET the environment gets in the way. Is there a better way?

[ASP.NET: Too Complex?]

 Well, Ben wrote a really good rant. It's true.

From one point of view ASP.NET is fantastic. "At last we can write web apps in normal way!", excitedly admits one friend of mine,former C++ coder who really hated ASP beacuse of that "mixing code (even more VBScript code!) with HTML, CSS styles, JScript client code, etc."

On the other hand another mine co-worker (former ASP/ADO developer, who never write even one line of C++ code) is not so happy with ASP.NET. He had no problem with VB.NET basics, with dragging controls to web form, nor with write some usual code. But when we tried to going more in depth, when we start discuss about class design, interfaces, inheritance, about creating custom controls the he again and again asking "Do we really need all this stuff? Why care about all this overly complex things, when we need just do this no problem web app? There must be a better way?".

There must be a better way... Just as Ben wrote. We can discuss to the death all this inside-out, which one from these two mine's co-worker's is right. It's imho depends on point of view. One see elegant framework, rich classes, fantastic possibilities with regards to extensibility. Another just looks for more simply way without all this "internal overhead".

Classic ASP win its fight and become so popular mainly due to its simplicity. With ASP.NET this simplicity somewhat disappear. And that may be entry barrier for many peoples who just liked this VB6 or ASP/ADO simplicity (for whatever reason).

There are many rumors about fact that C# and VB.NET will more differentiate in future. I wrote about this in one of my previous blog entries. Who know, maybe this can be "a better way", if VB.NET will be more RAD oriented tool, which is more simple to use, and C# will be "swiss army knife" for ones who lue extensibility, elegant design, possibility to do almost anything, more than just a quick (although maybe not also dirty) way to do something.

And, of course, this is not just a technical decision. I'm sure there are lots of internal politics going on within Microsoft on these very issues. Every change or addition will affect, will appeal to this old-VB loyal worldwide developer community with more than 3 million members, majority of which still consider what to do with regards to .NET.

Design Patterns for Web Design

"A Pattern", in the original definition of architect Christopher Alexander, "describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use that solution a million of times over..."

Although since many years used in software engineering design, specific patterns for hypermedia applications are being studied now only.

[Hypermedia Design Patters Repository]

I known that Design Patterns is really broad concept that goes fairly beyond it's use just in object-oriented design or in software engineering, but I just on yesterday found (via Sova v Siti - a great czech language weblog about web design) another interesting area of design pattern's use that can be useful for work I do.

HCI (which stands for Human-Computer Interaction, where also web design falls) Design Patterns are really interesting stuff, and I recommend to check it for everyone who is somewhat involved in creating web sites (for example, but not only, with ASP.NET).

Interested? So here are few links:

Hypermedia Design Patterns Repository
A nice collection of about 28 patterns divided into three well defined groups (Interace/Layout, Structure/Navigation, Content Oriented).

Martijn van Welie: Interaction Design Patterns
Big, but well arranged, collection of more than a 50 user interaction design patterns for web, GUI, and mobile device's UI. Good resource!

Jenifer Tidwell: Common Ground -- A Pattern Language for HCI Design
That is very interesting work covering not only web user interface, but also web site's information architecture.

Mark L. Irons: Patterns for Personal Web Sites
That is way cool! Excellent collections of more than 30 design patterns for web design, such as Three Jump Maximum, Secret Garden, Visible Location, Reward Visitors, Guessable URLs , Graceful Failure. Definitely a recommended reading for everyone who is creating web sites (or thinking about creating ones).

And on end there are two web sites with loads of links to other resources related to HCI design patterns:

Jan Borcher: hcipatterns.org -- The HCI Patterns Pages

Tom Erikson: The Interaction Design Patterns Page

Floor speech by Senator Robert Byrd. A brilliant articulation of how I feel

Keith Ballinger wrote:

Floor speech by Senator Robert Byrd. A brilliant articulation of how I feel.

[Floor speech by Senator Robert Byrd. A brilliant articulation of how I feel.

+1

Although I never heard about Senator Robert Byrd before and although I'm not an U.S. citizen, I think that this speech articulate also my feelings about all this Iraq thing we heard in news every night everywhere. Great speech!

PHP Mono Extension

Ollie Cornes wrote:

If anyone out there works with PHP, I'd be interested to know what developments are occurring in the PHP space to move the platform to higher levels of abstraction.

[Abstracting higher and higher]

Well, personally I'm do not work with PHP, but few days ago friend of mine show me something called PHP Mono Extension. To be honest, I do not sure if I like code like this:

<?php

$s = new Mono('System.Collections.Stack');
$s->Push('Hello World'
);
$s->Push('Mono'
);

if (
$s->Contains('Mono'
)) {
    print
"Works like a perfect darling";
}

print
$s->Pop()->ToString() . ' ' . $s->Pop->ToString
();


?>
 

nor I am sure what future will this have (it is still in alpha phase, and Mono is still under heavy development itself), but it may be interesting for these PHP guys if they could use Mono libraries.
Mimer SQL validator

"Portability is good just for camp beds" says someone (probably Jim McCarthy in "Dynamics of Software Development" but I'm not 100% sure. Great book, btw) and it may be even true in some situations .

But if you have to develop against more than one specific RDBMS, or if you just care about not being locked into specific RDBMS vendor, then you may find valuable following Mimer SQL standard validator. Actually, one can find three SQL standard validators there. One for SQL92 standard, one for SQL99, and finally one for SQL200x  standard. Validators also catch actual errors in SQL. Useful thing.

What's about IE7 or few thoughts about browsers in coma... errr... in maintenance mode.

Early & Adopter wrote:

They still make browsers?

Netscape releases 7.02.

http://channels.netscape.com/ns/browsers/download.jsp

It is a shame really.  Internet Explorer hasn't had any revolutionary features for over 3 versions now.  And it's no surprise why.  No outside push. 

Well, Early & Adopter probably means Netscape (or AOL, whatever) while asking if they still making browsers.

btw, it seems that they still does, but question is how long they will do in future. Two weeks ago MozillaNews had article about future of Netscape browser, future od Mozilla, etc. A good news for Mozilla, not so good for Netscape, as one may expected.

But even more interesting question is what's about IE7. Sounds like strange idea to discontinuing development of product which have more than 95% market share, but there were various rumors on web, especially when MS apparently promoting MSN Explorer more and more. Last time, actually on yesterday, I saw mention about this topic on Paul Thurrott's WinInfo web site. Concrete article is here. Paul for the most part do not write fluff, so there may be some truth in this.

So direct questions are "Does IE7 ever happen?", "Will be there just IE6.x.xxx maintenance versions or MS give a try to replace IE with something else? MSN Explorer, anyone?", or at last "Is there a need for separate browser app when browsing functionality probably will be incorporated in future into all other apps (file manager, office tools, dev IDE,  etc.), anyway?"

And maybe all these thoughts are just pointless and we will have IE up to v10 in few next years. Probably only time will tell (of course, unless someone from MS will care to comment now... :o)) )

How many banner adds you already saw today?

Well, another Sunday post is here...

How many banner adds you already saw today?  Do not know exactly? Sooo, you probably will have no problem to see a few more ones. You won't regret, I promise.


It's a not real add

It's a not real add

It's a not real add

There are more banner adds and maybe better ones than these (I just was unsure if someone wouldn't feel offended if I put here some of these nasty eBay, Lucent or VeriSign banners) so do no wait, click on one of above banners and enjoy!

Which OS Are You?

Which OS are You?


Which OS are You?
Which OS are You?

My first thought was  "Well, man, you know almost nothing about Palm OS..." 

Glad that I'm not end up as win9x. 

"Which OS Are You?" link found by [The .NET Guy]

UPDATE!

Just now, when seeing this in Syndirella, I got this with "cousin winCE". Uhmmm, maybe next cofee doesn't hurt...

 

How to set NTFS permissions from managed code or little confusion about security

Well, after few non-programming postings here is something for a change.

I past two weeks I independently ran twice to same problem. Once I was asked by one friend of mine, who trying write asp.net web app which goal should be to automatize process of creation FTP site, create few subdirs there, copying some files, setting NTFS permissions, and then sends notification that it is done. You know, user fill up forms, press button, thing get done, user got email, and everybody is happy. He realizes how to work with files, how to use System.DirectoryServices to manipulate IIS5, how to send email, how to appropriately set up the .config file, but then he stop on setting file permissions.

Few days later, I found similar question on local Czech/Slovak .NET programming mailing list.

Actual problem was that those people tried to set NTFS permission using classes that are for manipulating with Code Access Permissions (CAS) in CLR (i.e. classes from  System.Security, System.Security.*, System.Web.Security namespaces) and this, of course, do not work.

It is do not work for two reasons.

First, because CAS and native Windows security are different things and they work completely independently. Maybe source of this confusion was that some actions, such as accessing a file, are covered by both security infrastructures. First there are CLR's evidence-based (and maybe also role-based) security tests whether managed code is permitted to perform the requested operation. These test are done by CLR infrastructure. Then if these tests passed, Windows OS itself will check whether the account under which the code is running is permitted to perform the requested operation. These tests are done by operating system itself.  To successfully complete given operation code must pass both tests.

And second (maybe obvious) classes from System.Security, System.Security.*, System.Web.Security namespaces are in general designed  for manipulating with CLR security infrastructure (either with CAS or with role-based security) and can't be used to directly manipulate with native Windows security infrastructure. 

However, even after clearing this, original question, how to manipulate NTFS permissions from managed code remain unanswered. So, how to do this?

Well, there are a few options. One is to use Platform Invoke the Win32 API's and deal with variable length SID's and ACE structures. You can probably do anything that is possible with this approach, but it is rather a hard way. Similar approach is to write unmanaged code library and access is by InterOp services from managed code.

Another option is to use WMI via System.Management classes. You can see some code (from Willy Denoyette's posting to one of MS NewsGroups) with regards to this here.

And there is also very nice piece of code called "NT Security Classes for .NET" written by David Hall. Of course there may be also other libraries that one can get and use for this.

btw, this last mentioned code "NT Security Classes for .NET" library is written in Managed C++, which make me rethink (together with Sam Gentile's excellent Managed C++'s article Introduction to Managed C++ or on O'Reilly OnDotNet.com website) again whether I shouldn't give a Managed C++ another chance.

More Posts Next page »