❔ ✅ want to start web development, how and where can I start?
Hi, I am very new to c# and want to start web development journey in it, but I am confused with all the .net framworks/core, asp.net/core, why there are so many of them and what are required for web dev.
I want to learn the latest versions (to be future proof), may I know what should I learn? (btw my friend suggested me to learn .net core)
164 Replies
And if possible please do share some resources from where should I learn?
.net core, or to be specific .NET version 5 and onwards is what you want
$projects
Collections of application ideas that anyone can solve in any programming language to improve coding skills:
https://github.com/dotnet/dotnet-console-games
https://github.com/karan/Projects
https://github.com/florinpop17/app-ideas
tl;dr you want .NET 7 and ASP.NET Core, everything else is old and microsoft is bad at naming things
On Microsoft learn you should find plenty of resources for developing ASP.NET Core
how are they both different from each other? what should i learn first out of these?
.NET Framework (last version number is 4.8.1) is the legacy development framework which you really shouldn't use to start developing something new.
.NET Standard is a bridge between .NET Framework and the new .NET for sharing logic (it is not possible to use a library written in Framework in a new .NET project, and vice versa. That is where Standard comes in)
.NET is basically interchangeable with C#, it refers to the runtime and standard libraries
can't find exactly where? can you please share the link
ASP.NET Core is specifically the framework used for web development in C#/.NET
Overview of ASP.NET Core
Get an overview of ASP.NET Core, a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps.
so I should only focus for asp.net core for web dev, and forget about all the other things right
Think of .NET as the foundation on which you will build.
C# as the tool
And ASP.NET core as the material.
Using them you build your web app
you will learn the other things as a consequence of learning ASP.NET Core if that's what you mean
they're all related
You'll learn C# and .NET while learning ASP.NET Core, this is inevitable
i don't know if i'd try to learn C# by starting off with web development, but it might work for you
usually we point people towards less complex projects to get familiar with the language
However, if you have very basoc programming knowledge, I might suggest doing some game projects in the console first.
To get a grip of the language. You need to learn how to hold your tool - C#
Here are some good beginner $projects
Collections of application ideas that anyone can solve in any programming language to improve coding skills:
https://github.com/dotnet/dotnet-console-games
https://github.com/karan/Projects
https://github.com/florinpop17/app-ideas
there is also $helloworld if you want to start from scratch
Written interactive course https://learn.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/tutorials/
Videos https://dotnet.microsoft.com/learn/videos
yeah same, someone suggested me to directly jump on learning the framework, and eventually you will learn c# as you go
Really depends on how much new information you can handle at a time
Cause with web development you need to worry about so much more than just some conditions, loops, and oop
Same thing applies to any GUI development, cause worrying about those buttons, images, etc. can get quite overwhelming if you do not know the core basics
is this the complete tutorial ?
Well... There is so.much more to it then just that tutorial 😂
But that should get you an idea of what asp.net core is
You might also find some tutorials online. Possibly something from freecodingcamp
There is no complete tutorial per se
I get it, I must hop into open source projects to learn more
That is one strategy
Just pick a project and google your way to completion
damn
that look tiring and time consuming
That is literally learning any skill
If you are passionate about it, it isn't tiring, but addicting
I must try that
There's nothing that will lead you by hand to learn everything
I must get passionate now too lol
This ^
And if you think there is, then you'll get stuck in tutorial hell for eternity without learning a damn thing
I agree
Well everyone's approach is different
Thats the worst case
hopefully I will do good, but thank you so much for clearing my doubt, I must start the journey now
But imho learning a language is done best by doing it.
Same goes for learning a human language - learn by speaking and listening.
Programming language - learn by doing it
Yaaa, perfect example, I can't agree more
It's a long journey, full of headaches, doubt, error codes. But it will pay off. It is really fun. You will be the engineer, the architect, the detective and so much more at once..which is awesome
and the best part abot learning multiple programming langage is that, it is almost the same concept everywhere
I might be biased, but I suggest sticking to one to stay focused. Otherwise you'll be a jack of all trades and master of none
I am currently learning c++ btw, just about to finish
But yeah, I can do stuff in Java, react etc if needed. It's basically all the same unless you face some very specific requirement for that environment
Oh boy, you neverfinish 😂
But C++ is a wonderful language to know
It'll help you understand C# better
lol I suspect that, its very tough too
You can try and explore interoperating between C# and C++ at some point. Just for fun
But whats the use, the memory management is completely skipped in c#
Well...
Not really the case
Not to that degree as it is in C++
yeah I am thinkign to stick will 1 langauge for the rest of my life maybe
But your code can result in memory piling up and not being automatically garbadge collected
in c#?
That is the other extreme which is also not correct. Be open minding to change to something at some point. The job market can demand it
Yes
E.g., in WinForms which is a old GUI framework for Windows desktop applications you've gotta look up for GDI+ objects. They are used to draw what you see on the monitor. If you exceed a certain amount, your app crashes. So you have to properly dispose of your objects
And of course, C# has the feature of unsafe blocks, marshalls etc.
It is a very powerful tool
I heard somewhere that programmers need to be T shaped, I of the T is the base (where you must make yourself perfect at, or you are confident in) and the - part of the T is where you can learn and explore different technologies
I suppose you can think of it this way
it uses memory management?
C# has a garbage collector that cleans up unused memory from the heap
However, if you have some reference to an object which you forgot to remove, it will not be garbadge collected.
aha ok
One such object is... Well fine. But it you are e.g. adding and removing tons of objects in a period of time, then your used memory grows
Until you get some error. Eg out of memory exception or smth like that
But, fear not. C# has descent error messages. Not of the same level as Rust, but useable. Especially compared to C and C++
And once you decide to try functional.programming, you have F#
does c# has any feature that is not realted to any other language and that is heavily used in the industry?
As a language feature?
f#, isn't that a different programming langauge?
yeah
Not sure. All I can say, is that it has outgrown Java by a mile.
And C# is evolving, new versions coming out regularly with new and awesome features
So, c# will beat java in the future
Same goes for .net
It already has, basically
wow, on job perspective also?
Enterprises are still using it.
But licensing decision from oracle killed java for most companies, imho
I see they are doing some improvements over the years, hoping for it to become as popular as java
what about in c#, it is completely free right?
for enterprises
.NET is moving towards full AOT support. Meaning ahead of time compilation
Which is what, e.g. C and C++ does
Yes it is free
And opensource
cool, will it be as fast as c++/c in later time?
C# is even built with C#
And you can lookup the source code
Dunno, but it is quite performant
how is c# threads compared to other languages threads
It is Always a trade-off between comfort for the developer and performance
Well the threads are the same. But in C# threads by themselves are not really used anymore.
Oh have you tested it, is it in production yet
Instead you have asynchronous code
Async await
but for that nodejs is perfect imo
Nope, no time to test that
I think C# was the pioneer of this feature. Not sure
I didn't quite get it, does that mean that c# has not that performant threads
Didn't mean threads specifically. I mean t the language in general. I do not know how C# compiled with AOT compares to C++
But AOT compiles to native machine code
for larger applications shouldn't threads be preferred, over async /await
No
what are you sure
I refrain from explaining the difference between them, because I might get some crucial detail incorrect. If I maybe dumb it down to dust, async await helps you use threads much easily, then using them directly
So hopefully someone else can explain this with more confidence
C# is smart enough to move tasks to a new thread when needed
I know Golang is good for better threads (with their goroutines) and they say that it is the mostly favoured reason for enterprise application to adopt it. And for multiple users at a time threads should be used am i missing anything?
async/await isn't just multithreading either, it avoids using unnecessary CPU resources when waiting on other devices (like network IO)
$nothread
There Is No Thread
This is an essential truth of async in its purest form: There is no thread.
Well, yeah... You can start multiple process in parallel
is that the task of c# or async/await in general?
In case of C# specifically
For example, JS is strictly single-threaded
So async/await will never execute on another thread
E.g., in a classic desktop GUI application you have a so called UI (a.k.a. main) thread. It handles the drawing of the UI and e.g. button presses
When a user presses a button, you don't want the Main thread to process whatever that button does, because the UI would freeze - it is processing the button press.
Instead you'd run that on a different thread
And run it using async await.
Yeah that single threaded thing I understand, but why prefer single threaded in c# when we have multi threaded
web dev
It's not that you should prefer one over another
C# can decide for you
It does the heavy lifting for you
If resources on the current thread are free, C# will execute a given
Task
on the current thread
If it's busy, and another thread is free, it'll be executed on that threadAnd once the execution is done, the code returns back to the caller thread. Unless you specify otherwise
Yep
Think of
Task
s as kinda-sorta an abstraction of Thread
s
A higher-level APIThat also look much nicer than doing new Thread(......).Start()
now i understand
But don't view threads or async await as a hammer and all of your functions as a nail
Applying these everywhere won't make your app faster
In fact, it might even slow it down
And this is not a C# thing, but a general programming rule of thumb
Generally,
await
methods that are already async
, and make methods that await
something inside async
.
Shenanigans like await Task.From(...)
that turn synchronous code into asynchronous code are mostly unnecessary
Or rather, you should use them when you're sure you need them, not because "more cores go brrr"lol
E.g.,
GetUsersFromDatabaeAsync()
Is slmething that takes time and you'd want to run a different thread. And naturally, such methods usually are async
Which forces you to await them
Unless you do some dirty fire and forget
And lose track of exceptionsChances are it won't actually run on a new thread, though, because the current one is just free to do that
But it can, if need be
So by using async await, you are guaranteed to use threading resources in the most optimal way
Ofc, if you see some very specific use case you can use the classic threads
But generally, think async
And await
I think its too much for me to handle now as a beginner, you guys really explains well, as a beginner I understood it all lol
classic threads and tasks are the same? or tasks are asysnc/await?
Then your brain is a wonderful sponge. And you might be able to tackle learning ASP.NET Core straight away
Tasks are async await
You await a task
In an async method
As a beginner, just remember this about async/await:
1. If a method is
async
it must be await
ed
2. If a method does any await
ing it must be async
3. If a method is async
it must return a Task
or Task<T>
Task is like a promise
thank you for the apprectiation(whatever is the spelling)
Keep jn mind that with asp.net core you'll have to tackle MVC
Task or Task<T> difference?
void
-> Task
T
-> Task<T>
Or, if you are feeling adventurous, you can do asp. Net core with Blazor and use MVVM instead of MVC
ok, the asyn/await?
So if a method would be
void
when non-async, when it's async it should return Task
not Void
And if a method would return an int
, it should now return a Task<int>
And so onThe T in the <> is a generic parameter. Look up C# generics
Is it commonly used in inustries?
Blazor, not really that common
Asp.net core is much more popular and widely used
MVC and API, fairly common
But blazor is growing and beloved
Razor Pages somwehre in the middle
something like templates in Typescipt?
Ugh... Don't quite remember
Maybe?
Doesn't TS also have generics?
It does
Or do they call it "templates"?
That might be the case
can i make apps with react as frontend and asp.net core as backend ? and maybe use graphql to integrate both
Yeah you can
Asp.net core can be used to host some api
And handle a db connection
lol, I haven't reached the generics section yet, I was still learning
No, templates is something different
It is also called generics
also, what db should i learn?
None
Learn EF Core
It abstracts the db and you do everything with C#
wat is that
Well, EF does require some database to connect to
EF Core is an ORM
As for the database I would recommend, hands down PostgreSQL
It maps your C# to a database with a connector that you choose. E.g., for PostgreSQL you select a PostgreSQL connector
For SQLite you choose a different connector
thanks, I was thinking to learn that too
You would have to anyway
For Pg you'd use the NpgSQL driver
But if you want a simple db for testing, you can use SQLite
Mysql good?
Or maybe even an in memory databae
Depends on your app size ig
PostgreSQL is very powerful and scalable from what I've heard.
MySQL should be fine
Ok I think i should learn pg then
With C# and EF Core you don't learn a db directly
a very wierd question, can i use c++ in asp.net core
Why would you
You can interiop C# and C++
MySQL bad, if anything use MariaDB
Postgres best
no idea, maybe for adventour or speed
You also have managed C++ which runs on .NET
And afaik gets the .NET garbage collector plus some extra special pointer symbols like ^
But yeah... Only for adventure
Speed no
C# is fast enough
managed c++ and c++ are different?
Yes
Unmanaged - you have to delete allocated memory
ok then leave, I will do c# peacefully lol
Managed - it is done for you, it is managed for you
I believe there was also a project called IronPython that made python run on .NET
But afaik that is dead
long live c#
I must go to sleep its 4:10 am here now lol
I can open any eye now
Oh no it's not. They released a version with python 3.4 running on .net 6
Yes, time to sleep
You can see sharp ly
thats so cool, is it stable
Idk, ZZZZ time
Work tomorrow
😭 bye thank you for the help, see ya
++done
!done
Gn
/close use this
checking if it allows to send msg
@nyendrak do not hijack other threads, create your own. Moreover, this thread is closed
Oh, Sorry. I didn't realize.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.