开发者

Suggest right approach to develop a CMS application

开发者 https://www.devze.com 2023-01-21 15:32 出处:网络
I am developing a CMS application. Its a very huge deep and with full of configurable features. Current, I am developing it using Asp.net C#, form authentication and by creating UserControls.

I am developing a CMS application. Its a very huge deep and with full of configurable features. Current, I am developing it using Asp.net C#, form authentication and by creating UserControls.

There are lot of configurable items need to decide at run time as per user roles and some rules are predefined and so开发者_运维知识库me will be defined by Admin at runtime. The all information is stored in DB. I am getting lot of issues with USerControls. I consulted with some other guys who told my approach is wrong, I should go through DB data fetching. I really don't understand what is it? It is something like my all pages will be stores in Database and will construct at runtime and display as per rights?

Could anyone suggest me best approach and if there will be any example please provide?

Any response will be highly appreciated.


Are you using DataSource binding and etc. to access and read from database? If yes, then you should try avoid it. For example:

  1. Build Query like: "SELECT user_id FROM users WHERE login = ? and password_hash = ?";
  2. Bind parameters 'login' and 'password_hash'
  3. Assume that you use "Statement" variable for query:

    OdbcDataReader result = Statement.ExecuteReader(); //Look for specific database reader for your case    
    while (result.Read()) {
       integer user_id = result.GetInteger(0);
    }
    

Something like that. You can browse more specific database example here: http://www.easysoft.com/developer/languages/csharp/ado-net-odbc.html


Look at some CMS systems, such as Kentico, Dotnetnuke or Umbraco. They may support out-of-the-box what you're trying to develop by yourself...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号