What do you use to make javascript more C#-like? [closed] - asp.net

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm starting a new ASP.Net based project using javascript, JQuery etc on the browser.
I'm no expert at javascript and (after years of C# etc) get annoyed with its unstructured, typeless nature, no class hierarcy, everything global, etc. (It may not really be as bad as it sometimes feels!)
I'm aware there's various projects about to make javascript 'better' - things like knockoutjs, typescript, node.js and others - and I'm sure they all have their strengths and weaknesses, and probably one can use combinations of them.
I'm interested to know people's experiences and recommendations for what to use to make the javascript side of ASP.Net programming a little more structured (more like C#?) without too much of a learning curve.

Well first of all as javascript syntax is C-like you can write it in such a way that code will look like C. For instance check source code for asp.net ajax library.
Second, there is number of projects which were aimed to help write C# code that is translated to Javascript, that can help you as a starting point. Check http://sharpkit.net/ for that.
But regardless of what you are going to use you absolutely have to understand how javascript works in browser, what is DOM, what facilities window, document and navigator gives you etc etc
I belive that is your main problem, after all, it is really easy to learn how to use namespaces in javascript and bring structure to your code.
Also typescript that you mentioned in comments is really good at making code cleaner and more structured. It also adds classes and inheritance and types and some other cool features that you miss in language again.
So to sum up - you have to learn browser environment, the same way you have to learn .net classes on top of knowing c#-language. You can learn some easy tricks like AMD/require.js/js-namespaces to bring structure to your code, or since you are new and came from .net world - just adopt typescript.

Related

What is the past pathway to become a .net developer? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I want to create a learning plan for myself and for other novice students, lets say that I want to be able to create professional websites using asp.net.
C#, HTML, CSS , JS ASP
What do you recommend ?
For me, I started learning by browsing tutorials on Youtube. But still, the best way is through experience (at work). Learning the hard way as they say. :)
First, you should learn C# very well,
you can refer to this link to learn C# --- Click here to learn C#
Then you should have clear concepts on HTML/HTML5.
Refer to this link Click here to learn HTML
Then you should learn CSS , as you know CSS helps us in designing the website, and it looks pretty much attractive.
Refer to this link Click to learn CSS
Then you should learn JS, to make the page more dynamic.
Refer to this link Click to learn Javascript
Javascript helps us to program the behaviour of webpage
Then you should learn a database language such as mysql to store data into the database.
If you are using Visual Studio for learning ASP.NET using C#, you can follow the procedures given below : -
a. First learn how to use the forms - using textboxes, buttons, image etc.
b. Second, learn how to configure the database using .sqlexpress? ADO.NET
c. Third, learn to use grid view, data-table
or you can make a simple website of where you can insert, update,search,delete of the employees in a certain organization.
d. Then learn AJAX.
If you are not using Visual Studio , you can follow the link given below
Learn ASP.NET

New Years Resolution: Move from Classic ASP to ASP.NET MVC. Where do I start? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I can write Classic ASP with my eyes closed, and can do it well. Frankly, I've only not moved to newer technologies because I haven't had a project that couldn't be done in Classic ASP (VBScript). However, my New Years resolution is to finally make the jump. I must state in advance that because I like VB, I hate C#, but I'm willing to learn. I've done a little C# in the desktop world, but never in the web world.
I've been reading all week, but my biggest hurdle is that it doesn't seem like these newer technologies let me code in the same manner I had been: inline in the pages. Now, I realize that most people think this is beneficial, but this is a huge leap for me.
Without my laying out my preconceived notions and things I think I've learned in the past week, where do you all think is the best place to start? I'm in my 30s now, so I probably don't pick things up like I used to. With that said, the learning curve is probably steeper for me now than it would have been in 2003 when I should have done this. Other than some valid links, what are some of the impediments I'll come across as I start this journey?
In your position I would probably do the following. It sounds like you have access to Visual Studio. Since you have some experience with VB, I would pick a simple project that you did in VB and see if you can recreate it starting from a new ASP.NET MVC 4 Web Application Template. The main concept in MVC 4 (at least new to me) was how to use 'Razor' to display server data. It can be used to write inline code in C# but there are a few conventions that can save you a lot of HTML coding. There is also the partial view concept which can save you a lot of work. There are quite a few useful You-Tube videos out there. In particular, I think this guy https://www.youtube.com/channel/UCAo_CcePreaRTa3gQZBjWfA did a nice job teaching how to make Ajax requests in an MVC 4 application.
Good Luck!

Learning Twitter Bootstrap recommendations [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would really like to learn how to use Twitter Bootstrap 3. The problem is that it seems I can't find a good source to learn it from. Any source I've tried so far assumed that you somehow have some knowledge and wasn't explaining what are the available classes for elements, what are the classes they have used are actually doing etc.
I simply want a source it can either be a book/videos or w/e that will start from scratch and if possible, will use HTML5, modernizr and respond.js to make it cross-browser supported and actually give me a start point (base folder just like H5BP) which I can then later on start building my own websites.
Thanks in advance!
The bootstrap docs are really helpful, probably the best resource.
http://getbootstrap.com/getting-started/
http://getbootstrap.com/components
My first recommendation is to learn CSS in depth. Oftentimes, Bootstrap is just not necessary, but developers rely on it because they are too lazy to master CSS fundamentals. You are welcome to check my book series - Functional CSS - which covers almost the entirety of CSS using practical examples.
If you are keen on sticking with Bootstrap, then you can 1) print the source code for their example (Bootstrap examples) and simply re-implement them on your own, typing each block of code one line at a time and observing the effect, and 2) read the Bootstrap source code. The latter is a bit over 6000 lines and should not take long to go through. And, 3) reflecting on what you have learned in 1 and 2, create personal realistic website that uses Bootstrap.
If you are looking for a good source here is one: http://ieatcss.com/twitter-bootstrap-tutorial.html
3 Step by step real time examples are used in Ieatcss bootstrap 3 tutorial. You can easily understand them without any knowledge of the basics.
Don't worry about learning CSS & other messy things. The tutorials in http://ieatcss.com is targeted at complete beginners, you can easily understand them.
Regards,
Hussain.

If a codebase includes Twitter Bootstrap, should I use it in preference to hand-coding? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
A codebase includes Twitter Bootstrap, I can achieve a design for a component without using Twitter Bootstrap classes & elements. I can also achieve the design using Twitter Bootstrap classes & elements, overriding styles that are not applicable (but come with the built-in classes from Twitter Bootstrap). Which approach should I favor?
If the project already includes Bootstrap, it would probably be best to stick to the conventions of the project and use Bootstrap. If you have full control of the project you might want to remove Bootstrap, but either way it would be good to keep things consistent throughout.
Ask other coders you work with. If you're going to rewrite in your own way all the stuff that others are using and getting for free from Bootstrap, you will not make anyones life any easier.
This is probably going to result in very subjective answers, but I'll try to answer as well as I can.
I think it depends on the goals for your project, as well as the target design you have in mind.
If your priority is quick and low effort, maybe you want to use Bootstrap. That's where it seems to slot into development - when you don't want to, or can't, spend the time to do a custom job.
If you're hoping to end up with a project that looks like effort has gone into it, avoiding the cookie cutter feel you get from a popular visual framework is probably worth the effort.

Code Analysis for CSS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for automated tools to help me refactor a bunch of CSS files, for example:
Remove unnecessary selectors (e.g. not used inside the page)
detect repeatable rules inside several selectors and suggest a merge
Are there any such tools?
Thanks!
Yes Google Page Speed does this CSS investigation. Link:
http://code.google.com/speed/page-speed/docs/overview.html
not totally automated, but this one works well.
I like the fact that I can see what I'm changing. While I've done UI for 15 years, there's always little things that I notice myself repeating via using this tool. In the long run, doing things a bit manually is going to make me a better developer.
Doing one that looks for unnecessary selectors is a dangerous game. You could do it, but if you ever find yourself doing dynamic and/or ajax injected divs, you'll immediately blow up your page or app using an automated tool. If you do it, make sure it's not something that works on the fly, without some sort of very good testing environment to verify the resulting output. My current corporate clients would never allow me to use any sort of point-of-request tool based on their requirements of 100% tested and verified CSS.
This tool can do automatic css refactoring, though its value in project still need to evaluate carefully.

Resources