• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[KuziACC][ASP.NET MVC 4][Development]

Shikate

Pixel Artist since 2011
Joined
Mar 30, 2011
Messages
404
Reaction score
838
Location
Poland
So, I decided to learn ASP.NET MVC and to do something at least a little useful. So today I started KuziACC (Kuzi ACcount Creator). ASP.NET MVC4 applications can be deployed on Windows and Linux(tested, you need mono & apache or xsp4 server & mono).

Why dafuck ASP.NET MVC4 from Micro$oft?
- Application should be really secure
- I'm going for Test Driven Development and this technology is great for that
- Many things easy or already done(layout system, routing, third part libraries)
- C# is getting really popular and Microsoft is working on it's technologies so hard these days
- Async stuff and powerful language
- Great IDE(Visual Studio) makes development fast
- Security again...

What sucks:
- Application speed
- Async functions not available for mono on Linux yet
- Compiling this shit?

What I've got so far:

uW5atGt.png



CLCF9DV.png



So I got:
- Incomplete Layout(I thought about footer, more tiles, maybe other background)
- Incomplete register page

Plans:
- DevACC has it's REST'ful API so it would be cool to also have it(ASP.NET allows it easily)
- Cover whole functionality of TFS 1.0
- Have more features than Znote, Gesior, Modern, DevACC, anything that will come

Why I've created this thread so early?
- for something fresh to be happening in accmakers zone now
- to get feedback on design, functionality, what could be added etc. (when I'll create something new I'll post it here)

Why not single-page application?
- I know only Ember.js but it's fucking complicated each time you will start with it you got headache and it's Ember-Data which I would use to consume REST-ful API like DevACC is doing is not ready yet...

Why I'm not going open-source yet?
- I have to create this application myself so I can learn every aspect of ASP.NET MVC.
- Project is not production ready yet.

Hope you enjoy, have a great holidays.
 
Last edited:
you know that ACC means Account
KuziACC makes no sense, should be KuziAAC(automatic account creator)

anyway, good luck i'll be watching this thread :p
 
You're right but too many occurrences to change this now, I've added an explanation (KuziACC - Kuzi ACcount Creator).
 
News page:
Fllh7HP.png



Register page:
sLNvqIF.png



I don't have connection with database yet, I have to create models and repositories(currently I'm imitating INewsRepository) for data with TFS 1.0 structure. However, I'm happy with progress. I'm on 176 page/680 pages of ASP.NET MVC 4 book, so looong way to go ^^

#Edit
Oh, and background image is fixed so it stays in the same position even if you scroll, but Chrome screenshot extension isn't able to capture it correct.
 
What sucks:
- Application speed
- Async functions not available for mono on Linux yet
- Compiling this shit?

That 3 things, would make me NOT use this AAC. And why even use ASP.NET? Worst fuck*ng framework ever.
Anyhow, I am always glad to see new projects so good luck! :)
 
Last edited:
That 3 things, would make me NOT use this AAC. And why even use ASP.NET? Worst fuck*ng language ever.
Anyhow, I am always glad to see new projects so good luck! :)

ASP.NET isn't even a language. It's a web framework. The general language ASP.NET uses is C#.
It isn't even that bad either, there are several major websites that use ASP.NET (stackoverflow is one of them), it only works well when it's done right.
 
ASP.NET isn't even a language. It's a web framework. The general language ASP.NET uses is C#.
It isn't even that bad either, there are several major websites that use ASP.NET (stackoverflow is one of them), it only works well when it's done right.

Ok sorry you're right it is an framework, changed it. I am sure it has it 'good things' like everything has.
But no, I still not find this good even if stackoverflow uses it or some other sites. Why make it so complicated? :)
 
Ok sorry you're right it is an framework, changed it. I am sure it has it 'good things' like everything has.
But no, I still not find this good even if stackoverflow uses it or some other sites. Why make it so complicated? :)

I'm not making it so complicated. I'm just tired of the Microsoft/C# hate. ASP.NET is not bad, it really isn't.
I haven't found anything bad about it that makes it completely useless or dangerous. And with Mono, ASP.NET is destined to grow.
 
I'm not making it so complicated. I'm just tired of the Microsoft/C# hate. ASP.NET is not bad, it really isn't.
I haven't found anything bad about it that makes it completely useless or dangerous. And with Mono, ASP.NET is destined to grow.

Maybe it has an reason why it is hated? And I didn't say it is useless or even dangerous.
Well, I gonna show him some respect and stop debate in his thread. If you wanna talk more about this send me a PM! :)

I really looking forward to see this grow and proof me that my picture about ASP.NET/C# is totally wrong.

Good luck ! :)
 
I learned to code ASP.NET/C# on my IT Bachelor degree. I hated it so much. Messing around with data sources, shitty markup components, visual studio IDE, bad web community, Micro$oft.
I actually wrote on my resume that even though I learned ASP.NET/C# on my education I would refuse any related job offers. I have 2 years of forced experience coding this and I am so happy I am finished.

But good luck, perhaps you will like asp.net more than me. Perhaps you may end up loving it like I do with PHP since you make it a hobby project. :)
 
Wow, today I managed to set up MySQL server with TFS 1.0 schema database using MySQL Workbench, then I created connection to it from project using EntityFramework. So, news is now displayed straight from database. However, MySQL + Entity Framework + VS Express edition is impossible to do... Next problem was MySQL + Entity Framework + VS Ultimate, Microsoft wants everyone to use MS SQL otherwise you will need to spend like 2 hours on getting right packages for MySQL Connector and configuration. Also I think I've spend like 30 minutes on getting strange errors(sql provider incompatible) because when I copied connection string of my database in Server Explorer it didn't add `Pwd`(password) key to it and I was getting: `access denied (using password: NO) for root@localhost`, but Visual Studio debugging for websites is really cool and didn't let me to see that. You get debug in Visual Studio with incompatibile error AND you have to click continue, so page in your browser loads and you get real error with helpful information, not some `shit is incompatible` from other universe. Now I have to cleanup unnecessary NuGet references and config sections.
Seems like ASP.NET MVC lets you to focus only on programming. <3 You'll never get angry or irritated using Visual Studio. I believe that now I'm through the hardest part of application config and future is promising. No screenshots today. = [
 
Well im sorry to say this won't go far, most ot users spend like 5 min to setup there homepage but to be fair ive never tried to setup an asp homepage.
What im saying is that homepages with php will be more attractive then something like this.
But I still hope you will continue with this and that someone uses it.
 
Thanks for all replies.

@dominique120
If someone would be interested to buy it would be the only case it wouldn't be released to the public with source code. Otherwise, only I would use this or no one ; D

@WibbenZ
I thought about this. Firstly, I'll try to make everything easy as possible but I'm not pro and even for me it is complicated. Secondly, OT admins usually spend more time on setting up website because of various issues. If you have experience in Open Tibia you probably came across bugs that made deploying website delayed/complicated. PHP errors for newbie are really discouraging. I would sacrifice some time to get everything working and have something solid & secure or I would try to do this even if it requires more work because of curiosity. On Windows it should be easy to deploy such application, on Linux, it would require mod-mono, mono, xsp4, apache or nginx and small ammount of configuration, then small sudo service apache2 restart and you have website running, the case would be to make link do tfs database and maybe config.lua, but I'm really optimistic.

#edit
If someone is interested in TFS database structure here's screen from MySQL Workbench ; D :
3iP2RCP.png


#edit2
I added pagination helper that will be useful on other pages, for now, when you go eg. to http://test.org/News/Page2, you get:
YhffOyel.png

This time also with info from database ; ) Constructing database queries in C# has nothing to do with SQL syntax and you may not notice you query database. You work on collections. Eg. my pagination query:
Code:
News = repository.News.OrderByDescending(news => news.Id).Skip((page - 1) * newsPerPage).Take(newsPerPage);
Setting up my URL to be like News/Page1 is ultra easy compared to Apache(from my point of view):
Code:
// this is for News \/
routes.MapRoute(
                name: null,
                url: "{controller}/Page{page}", // same as News?page={page}
                defaults: new { controller = "News", action = "Index", id = UrlParameter.Optional }
            );
// this is default \/
routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "News", action = "Index", id = UrlParameter.Optional } // landing page for now
            );
 
Last edited:
Today's progress:
Commits:
RpBNgCb.png


Summary:
I've spend most time on writing authentication that will work nice with ASP.NET MVC architecture + MySQL for retrieving/updating/creating users. I had to write my custom implementation of Membership system(so it uses tfs database structure, hashes passwords with SHA1). I didn't implement all methods but creating users, authentication, get user by id works. I can say that this is another day when I don't have good *visual* results but spent a lot of time getting things work. I believe that Membership system is secure, at least for XSS. Also, I decided to create private remote repository at GitLab.com so my code stays safe in web in case of any hardware accident.

Login SYSTEM :D
Os30dmI.png

Account/Login route or small component in top navigation bar


After login(notice menu with user settings top right):
yE5y6cE.png


Database(I have to take care of type, premdays, lastday soon):
peF9Sik.png


At this moment special signs like polish character - Ż is allowed, will TFS 1.0 support such account names? Or special signs in name like #$%^?
 
Back
Top