How to use?

What you need?

  1. Asp.Net 4.0 (minimum) web site or web application.
  2. MS Sql Server 2005 (minimum).
  3. Fantom library and test application. (Please download source codes with FantomTest)

Start Settings

Please download FantomTest web site from Source Code tab. Looking for FantomConfig declaration and setting tags in web.config file.

Now open Default.aspx on FantomTest web site source codes. Find a label object on the page. Its text property is an example of you. Its have 3 segment.

  1. Fantom class referance. You dont change this.
  2. Group referance. This mean for example, on a page to read all the data at one time. Groups are read once and stored in the cache. In this way, each time the query is created.
  3. Key referance.

Let me explain the example page (Fantom:MAIN:HELLO); Fantom is generic class referance, MAIN is a group name and HELLO is word referance.

Please run Dictionary.sql (in root directory of FantomTest) in your database for create dictionay table. Its have data should be as follows:

 id          Culture    Group                                              Key                                                Value
----------- ---------- -------------------------------------------------- --------------------------------------------------
1           en-US      MAIN                                               HELLO                                            Hello World!
2           tr-TR        MAIN                                               HELLO                                            Merhaba Dünya!

Please edit connection string for your db on web.config file.

With reference sample to the above table will be better understood. If you want to work with the code default.aspx.cs open the file. Looking Page_Load method. A good example of this.

If you want to work with your own table, part of the source code from the fantomsettings / configsetting.vb open the file. Here are the properties of configuration settings for web.config file.

  1. CultureSessionKey: Current culture key stored session with this value. (default: SiteCulture)
  2. ConnectionStringName: Your connection string name on web.config file.
  3. TableName: Dictionary table or view name. (default: FantomDictionary)
  4. GroupField: Contains group names column name. (default: Group)
  5. KeyField: Contains key names column name (default: Key)
  6. CultureField: Contains culture referances column name (default: Culture)
  7. ValueField: Contains result values column name (default: Value)

Change this FantomConfig attributes for your own table or view on web.config file.

Please follow halityurttas.blogspot.com.tr for details (page is turkish, please use translate).

Türkçe döküman ve destek için halityurttas.blogspot.com.tr adresinden projeler başlığı altında Fantom Projesi olarak detaylı döküman ve örneklere ulaşabilirsiniz.

Last edited Jun 6, 2014 at 2:18 PM by halityurttas, version 3