Who is Ali Özgür?

RecentComments

Comment RSS
aliozgur posted on May 19, 2008 09:00

Evolution of new web technologies directed enterprises to web based software solutions. New tecnologies and frameworks offer lots features for web based solutions but entreprises still need some sort of rich client back office software to access backend data or perform specialized and complicated business tasks.

Pragma BackOffice (PragmaBO) is an effort to provide extensible rich client framework for enterprise level back office solutions based on Microsoft platform (Windows, .NET , C#, MS SQL Server 2005/Express ). Main features of PragmaBO are More...


Posted in: .NET Development , General Development  Tags:
aliozgur posted on April 23, 2008 09:29
As a former long standing Delphi developer (actually I am still maintaining some Delphi projects) I really love the Delphi IDE. Visual Studio is also a fantastic IDE with lots of productivity features. But I always missed "Numbered Bookmarks" of Delphi. This feature really saves time while navigating source code back and forward. Finally I found DPack addin which has Numbered Bookmarks and emulation of some GExperts for Delphi features. DPack is also a free addin, I would recommend this addin to former Delphi developers . You can get DPack from here.

Posted in: .NET Development  Tags:

For a while I am thinking about the Microsoft's support to open source projects. Some news that attracted my attention to this issue were

  • Foundation of CodePlex, open source project hosting web site of Microsoft
  • Ms-PL license developed by Microsoft  
  • Release of .NET Framework libraries  source code . Read more
  • Release of ASP .NET MVC source code. Read more

Heritage

Microsoft has developed very successfull technologies through history. COM/ActiveX formed a good baseline for MS platforms and related runtimes like MTS, COM+ and DCOM were a must for enterprise level application development targeted at MS platforms. VB was a fantastic programming language, even I've never written single line of VB code I remember how my co-workers rocked with VB, ASP was not perfect but it was, actually it still is, productive and easy to learn and VC++ powered with MFC was the programming language of choice for lower level software development. All these runtimes, frameworks and languages were not perfect, but they did succeeded in helping software developers to produce valuable software. However some of these technologies required software developers to have some sort of geek talent. For example it was very difficult for a regular software developer to write some sort of event sink COM code or programmatically configure the DCOM environment. I think Microsoft has learned more than we expected from the history I briefly tried to explain. Now we are at the age of .NET and related technologies and personally I expect less hesitation than the previous experiences we all ran through.
More...


Some PragmaSQL users were notifying me about a strange but deadly serious error caused after recovering from a server connection transport-level error. To reproduce the error follow these steps:

1- Open PragmaSQL Editor and choose a connection from Saved Connections list to connect. I will assume that Default Database of the selected connection is DatabaseA 

2- In the opened script editor change database to DatabaseB

3- Open to Microsoft Sql Server Management Studio and from Management node select Activity Monitor. Find the process for DatabaseB created by PragmaSQL application and kill that process.

4- Return to PragmaSQL editor and try to execute the select statement for the selected database, that is DatabaseB.

5- You will get transport-level error after trying to execute the statement for the first time.

6- Try to execute the statement again and this time you will succeed. But the statement was executed on the initial database, that is DatabaseA not in DatabaseB (selected one ). This error may cause very serious problems if you were trying to modify data you would simply modify the data in wrong database.

The problem is actually with database change code inside PragmaSQL which is not really a bug but misusage of SqlConnection class's ChangeDatabase method. While I was coding the change database logic I did not realy realised that ChangeDatabase method does not modify the Initial Catalog property of the ConnectionString, actually there is no way to modify the ConnectionString property of the SqlConnection object once it is opened. SqlConnection object in the script editor is created and opened only after the user changes the selected server, database changes does not cause a new SqlConnection object to be created and opened, we simply change the database property of the existing SqlConnection object and that is it. I did not considered SqlConnection object's error recovery scnearios (transport-level error for example) at all. The fact is that SqlConnection class recovers from transport-level error very well but uses the ConnectionString property to reopen the connection, no matter what was the database before the error SqlConnection object always restores connection to Initial Catalog property specified in the ConnectionString.

Very ugly bug, but I am happy to resolve that one. Upcoming 1.0.0.34 version will include solution for this issue.


Introduction

Cuyahoga provides module developers with a simple to use wrapper classes for full text indexing with Lucene.NET.
Although wrapper classes are easy to use these classes are not generic in nature. I mean
we, as module developers, have to convert our custom content (be it static or dynamic)
to a SearchContent object so that wrapper classes can index that content. Another similar limitation is when we perform search on the indexed content we can only get collection of SearchResult objects. I also want to mention that we, as module developers, have no control over which fields will be stored/unstored, which fields will be used as keywords or which fields will not be indexed while wrapper objects build the full text index.

In this article I will try to show you how we can make Cuyahoga.Core fulltext indexing capabilities more generic by providing a seperate extension assembly.
More...


Posted in: .NET Development , CodeProject , Cuyahoga , Lucene.NET  Tags:
aliozgur posted on February 18, 2008 14:24

Introduction

Cuyahoga framework has very nice approach to Web development. It has bunch of built-in modules and you can develop your own modules in a
couple of hours. If you have some experience with NHibernate and/or some other web framework your module development
may even take less than an hour. My product site PragmaSQL Online runs on top of Cuyahoga framework and it took
me just a couple of hours to bring this site up and running. Although Cuyahoga is a very nice framework and I love Cuyahoga development
I shall admit that you may experience some problems while applying some advanced topics like Ajax to Cuyahoga. In this article
I will show you a simple and structured way to add Ajax support to your Cuyahoga web site.
More...


Posted in: .NET Development , CodeProject , Cuyahoga , NHibernate  Tags:
aliozgur posted on February 6, 2008 14:28

Audit logging is an important issue while building enterprise systems. Simplest form of audit logging is recording
who and when created/updated an object, or a record in the database respectively. We perform four basic operations
on a domain object. These are

Load
Update
Save
Delete


Data access layer is a good place to perform automated audit logging
whenever one of the operations above is executed. NHibernate provides us with
IInterceptor interface plus ILifecylce interface. You can read this article for more
information about Nhibernate entity lifecyle management.

In this article we will try to perform simple logging that meets the
following minimal requirements

1- We will log who performed insert/update and when this operation was performed
2- Log data will be written to the same database and table as our domain object
More...


Posted in: .NET Development , CodeProject , NHibernate  Tags:
aliozgur posted on January 7, 2008 14:15

Motivation

PragmaSQL started as part time development effort and by time PragmaSQL evolved to a commercial product.
Today PragmaSQL has a dedicated web site (PragmaSQL Online) build on Cuyahoga Framework.
PragmaSQL Online was primarly designed to meet very simple requirements like

  • Host simple advertorial content introducing PragmaSQL
  • Host downloads ( PragmaSQL Application, 3rd party add-ins and other open source material)
  • Licences distribution and validation via some web services.


As the number of people using PragmaSQL increased PragmaSQL Forum was added to enable users to communicate
with each other and with PragmaSQL developers. PragmaSQL forum was the only place where people submitted bugs,
support and new feature requests. But as the number of posts increased managing all this content became a real pain for
me. It was hard to group and keep track of the posts, for example i could not know exactly how many bugs were posted
and how many of these bugs are waiting, in progress or already resolved.
Forum approach to maintainance was also inefficient for the users , they had no clue about the status of their posts
because Forum Module did not provided custom post attributes and the communication model was very loose. Forum module
did not have any mechanism to notify users about the status changes of their posts.
More...


Posted in: .NET Development , CodeProject , Cuyahoga , NHibernate  Tags:
In this short article i want to give a sample code describing how you can retreive statistical information about the T-SQL statements executed over a SqlConnection.

Background

While i was developing PragmaSQL T-SQL editor, guys using the initial versions wanted to know how many rows were affected as a result of a T-SQL statement (DML) executed.My first attempt was tracing the T-SQL statements sent by Management Studio to the server. But this was helpless, since Management Studio is not sending any extra statements to figure out how many rows were affected. My second attemtp was wiring-up to SqlInfoMessageEventHandler and inspecting info messages returned by the server. But sql server was not sending any extra information about the executed statements via this event. Then while i was looking to the SqlConnection properties i noticed StatisticsEnabled property and this was the property that would meet my requirement.

Using the code

Retreiving statistical information over SqlConnection is very simple. Here is the sample code



//

// Sample T-SQL execute code

//  

private void ExecuteSql(SqlConnection conn, string scriptText)

{

    SqlCommand cmd = null;

    try

    {

        conn.StatisticsEnabled = true;

        conn.ResetStatistics();

        cmd = new SqlCommand(conn, conn);

        cmd.ExecuteNonQuery();

        

        // Here is the sample wrapper to process statistics.

        ProcessConnectionStatistics(conn.RetrieveStatistics());

    }

    finally

    {

        conn.StatisticsEnabled = false;

        if(cmd != null)

         cmd.Dispose();

    }

}


// Sample function to process SqlConnection statistics

// This function only extracts the entry with name IduRows.

// to reflect the rows affected.

private void ProcessConnectionStatistics(IDictionary stats)

{

  foreach (object key in stats.Keys)

  {

    object statVal = stats[key];

    if (key == null || key.ToString().ToLowerInvariant() != "IduRows".ToLowerInvariant())

      continue;


    string statValStr = statVal.ToString();

    if (String.IsNullOrEmpty(statValStr) || statValStr.Trim() == "0")

      continue;


    MessageBox.Show(String.Format("( %s ) rows affected.",statValStr);

  }

}



Posted in: .NET Development , CodeProject  Tags:
In previous article NHibernate Best Practices with ASP .NET, Generics and Unit Tests by Bill McCafferty NHSessionManager is configured via App/Web config simply to work with NHibernate core assembly. Since NHSessionManager and other assemblies (Core, Data and Test) are located in the same solution this simple way is enough for all practical purposes. But for sake of code resuse we can think to reorginize NHibernate utility classes (NHSessionManager, DomainObject, NHGenericDao) and interfaces (IGenericDao) in a seperate solution/project. When this is the case we need a more generic way to specify NHSessionManager configuration. Another article Using NHibernate with Multiple Databases again by Bill McCafferty is a very good example how to extend configuration system of .NET
More...

Posted in: .NET Development , CodeProject , NHibernate  Tags: