Archive

Archive for the ‘Software Development’ Category

GateIn document nightly build version

Recently, I had so much questions about new GateIn document such as how to configuration SSO, Portal navigation … although there are some updates for them in the development version. And today, I decide create a site for GateIn document nightly build version, it’s updated daily or whenever has updates, if you’re developer, administrator or user who want to find out how to use, configure the GateIn development version, don’t wait for new release, checkout now and use nightly build document version at here

  • Reference guide
    • HTML documentation with one page per chapter here
    • HTML documentation all in one page here
  • User guide
    • HTML documentation with one page per chapter here
    • HTML documentation all in one page here
Categories: GateIn, OSS

Cài đặt và sử dụng GateIn portal

1. Giới thiệu GateIn portal
Portal, cổng thông tin, cổng thông tin điện tử tích hợp, … những cụm từ này chắc chắn chúng ta đã từng nghe đến nhưng chính xác khái niệm này như thế nào và ứng dụng nó ra sao thì không phải ai cũng nắm rõ. Bây giờ chúng ta thử phân tích một số khía cạnh để hiểu rõ hơn về portal như thế nào?
Categories: GateIn, OSS

Comparing between Guice and PicoContainer

  • Guice

The first thing u’ll notice is that Guice makes extensive use of Java 5 language features. ie, generics and annotations. While generics lead to the extraordinary type safety mentioned by Kevin Bourrillion, annotations couple your code to the Guice framework. If u’ve really picky about loose coupling you might ask why you should use a framework that adds a dependency to itself? You end up with lots of imports of the Inject annotation scattered all over your code base. And it’s getting worse if you have to use Singleton, ImplementedBy and so on and so forth. You may want to define that elsewhere because your classes shouldn’t know any thing about their usage or where dependencies should be Inject – That’s what inversion of control is all about, isn’t it :).

However, for those who aren’t so pickly there are some really cool things about Guice:
– it is type safe
– it reports same error messages
– it is small and very fast

Well it is really type safe: if you ask Guice to give you an object of type Bar, it’ll do so – no cast to Bar required. The authors of Guice don’t want it to be used as a simple service locator for a good reason: your code would still be coupled very tightly. That being said you want to call Guice only in some places in your code where it hand you a top-lever class where all the dependencies are injected. Whether you’ll have to do a cast on these few occasions shouldn’t be that bad; this puts the big feature of type safety into another perspective (read: isn’t that important). But this is definitely a plus for Guice though.

Reasonable error messages are one point for Guice: if something goes wrong you can identify the problem easily. From a user’s perspective this should be the case anyway but Guice manages this very well – as far as I noticed it.

  • Pico Container

PicoContainer is a nice piece of software that facilitates dependency injection without much overhead: no external configuration files (read XML files) and no annotations needed. All you have to do is register your components with the container; for small projects this is an effortless thing.

As with Guice you write everything in Java and can reap the benefits of your IDE’s refactoring capabilities: if you change a class’s name all references will be changed too

Categories: Java

Programming Styles

January 26, 2010 Leave a comment

Over the years I’ve met many developers and got to know many different programming styles. Here are some of the odd ones. Do you know someone like that?

Shotgun Programming

It is a programming style where the developer tries random shots at the code. “Well, this method call is failing…. I’ll try changing this parameter from false to true!” Then of course it doesn’t work and the developer goes: “Well, maybe I could just comment out the whole method call!” and so on. It can go on forever until it works by pure chance or the developer is rescued by a peer who points the correct solution.

A regular developer can go crazy in a few hours if he finds himself pairing with a shotgun programmer. It can drive you NUTS. Two shotgun programmers should never do pair programming together, because their destructive results are magnified when they work together.
Read more…

Categories: Software Development

SQL Server 2008 display error when i want to edit a table

October 28, 2009 Leave a comment

SQL 2008 Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.

I’ve just started using SQL 2008 and have encountered a very annoying problem. Whenever I change a table I get an error:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

WTF? I was able to change tables whenever I wanted to in SQL 2000 and 2005 and now I’m not allowed to in SQL 2008. Oh wait, I need to disable some stupid option that shouldn’t have been enabled in the first place. To do this follow these instructions:

Within SQL Management Studio click on the Tools menu. Then Options, then the Designer node and uncheck the box that says: Prevent saving changes that require the table to be re-created.

Now we can actually work with tables like we were able to do in SQL 2005. Nice extra step MS, next time make it more difficult to do what we need to do.

Categories: SQL Server 2008

Visual studio 2008 SP1 is available

October 27, 2009 2 comments

This is download link for VS 2008 SP1. If you want install SQL Server2008, must be install VS 2008 SP1 before

http://download.microsoft.com/download/a/3/7/a371b6d1-fc5e-44f7-914c-cb452b4043a9/VS2008SP1ENUX1512962.iso

Add telerik into VS 9

September 8, 2009 Leave a comment

Add các file .dll trong thư mục bin35 vào thư mục bin của solution và vào thư mục C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies

Categories: .NET

Hiển thị tab security trong properties của folder

July 24, 2009 1 comment

Yêu cầu trước tiên đối với phát triển module DotNetNuke là account ASPNET phải được cấp full control đối với thư mục web đó.

Read more…

Categories: DotNetNuke Tags: , ,

VS không chịu Debug website project chạy trên IIS

Ấn F5, nhận được thông báo này, buồn hẳn.

Cách fix:

  1. Vô IIS, chọn properties của webproject
  2. Trong tab Driectory Security chọn Edit ở Anonymous….
  3. Checked Integrated Windows authentication

Chạy lại debug là thấy đẹp lại ngay

Categories: .NET