JavaScript - Map vs. ForEach πΊ
Whatβs the difference between Map and ForEach in JavaScriptβ
Letβs first take a look at the definitions on MDN π :
β’ forEach() β executes a provided function once for each array element.
β’ map() β creates a new array with the results of calling a provided function on every element in the calling array.
What exactly does this meanβ
https://t.me/pgimg/81
[ Article ] : http://bit.do/mapjs
γ°γ°γ°γ°γ°γ°
#JavaScript #ForEach #Map
@ProgrammingTip
Whatβs the difference between Map and ForEach in JavaScriptβ
Letβs first take a look at the definitions on MDN π :
β’ forEach() β executes a provided function once for each array element.
β’ map() β creates a new array with the results of calling a provided function on every element in the calling array.
What exactly does this meanβ
https://t.me/pgimg/81
[ Article ] : http://bit.do/mapjs
γ°γ°γ°γ°γ°γ°
#JavaScript #ForEach #Map
@ProgrammingTip
Telegram
Programming Tips Resources
dbForge Event Profiler β‘οΈ
dbForge Event Profiler for SQL Server is a FREE tool that allows you to capture and analyze SQL Server events. βοΈ
The events and data columns are stored in a physical trace file for later examination. π
You can use this information to identify and troubleshoot many SQL Server-related problems. π
https://t.me/pgimg/83
[ Download ] : https://t.me/pgimg/84
[ Website ] : http://bit.do/dbfor
γ°γ°γ°γ°γ°γ°
#SQLServer #Profiler #DbForge
@ProgrammingTip
dbForge Event Profiler for SQL Server is a FREE tool that allows you to capture and analyze SQL Server events. βοΈ
The events and data columns are stored in a physical trace file for later examination. π
You can use this information to identify and troubleshoot many SQL Server-related problems. π
https://t.me/pgimg/83
[ Download ] : https://t.me/pgimg/84
[ Website ] : http://bit.do/dbfor
γ°γ°γ°γ°γ°γ°
#SQLServer #Profiler #DbForge
@ProgrammingTip
Telegram
Programming Tips Resources
Passport.Js β‘οΈ
Passport is authentication middleware for Node.js.
Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. π₯
A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more. π¦
https://t.me/pgimg/85
[ Website ] : passportjs.org
γ°γ°γ°γ°γ°γ°
#JavaScript #NodeJs #Authentication
@ProgrammingTip
Passport is authentication middleware for Node.js.
Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. π₯
A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more. π¦
https://t.me/pgimg/85
[ Website ] : passportjs.org
γ°γ°γ°γ°γ°γ°
#JavaScript #NodeJs #Authentication
@ProgrammingTip
Telegram
Programming Tips Resources
Xamarin VS Ionic VS React Native π₯
Traditionally, Android applications are developed in Java, and iOS ones are written in Swift and Objective-C. βοΈ
Nevertheless, there exist plenty of other alternate tools that can be used instead. π¨π»βπ»
Xamarin, React Native and Ionic are popular examples of such tools. π
What is their purposeβ
What makes them differentβ
Which of them is the bestβ
Weβll try to answer these questions in the article below. β¬οΈ
https://t.me/pgimg/86
[ Article ] : http://bit.do/cpfo
γ°γ°γ°γ°γ°γ°
#Xamarin #ReactNative #Ionic
@ProgrammingTip
Traditionally, Android applications are developed in Java, and iOS ones are written in Swift and Objective-C. βοΈ
Nevertheless, there exist plenty of other alternate tools that can be used instead. π¨π»βπ»
Xamarin, React Native and Ionic are popular examples of such tools. π
What is their purposeβ
What makes them differentβ
Which of them is the bestβ
Weβll try to answer these questions in the article below. β¬οΈ
https://t.me/pgimg/86
[ Article ] : http://bit.do/cpfo
γ°γ°γ°γ°γ°γ°
#Xamarin #ReactNative #Ionic
@ProgrammingTip
Telegram
Programming Tips Resources
Quick Tip: How to pass visual alerts with an HTMLHelperβ οΈ
It will display a Bootstrap alert if there is a message passed through the ViewModel. π₯
This message can be a success, error, warning, or informational message. π
The nice thing about the ViewMessage HtmlHelper is that if we don't pass it into our views, it won't display anything. π
https://t.me/pgimg/87
[ Article ] : http://bit.do/alhl
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode
@ProgrammingTip
It will display a Bootstrap alert if there is a message passed through the ViewModel. π₯
This message can be a success, error, warning, or informational message. π
The nice thing about the ViewMessage HtmlHelper is that if we don't pass it into our views, it won't display anything. π
https://t.me/pgimg/87
[ Article ] : http://bit.do/alhl
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode
@ProgrammingTip
Telegram
Programming Tips Resources
Send ETag headers in ASP.NET Core β¨
ASP.NET Core doesnβt add an ETag header automatically to HTTP responses from MVC action methods or Razor Pages. β
We have to implement that ourselves to provide the users with true Conditional GET support that honors the If-None-Match request header. β
Wouldnβt it be nice if all we had to do was to register it using app.UseETagger() like thisβ
https://t.me/pgimg/88
[ Article ] : http://bit.do/etags
γ°γ°γ°γ°γ°γ°
#AspMvc #AspCore #ETag
@ProgrammingTip
ASP.NET Core doesnβt add an ETag header automatically to HTTP responses from MVC action methods or Razor Pages. β
We have to implement that ourselves to provide the users with true Conditional GET support that honors the If-None-Match request header. β
Wouldnβt it be nice if all we had to do was to register it using app.UseETagger() like thisβ
https://t.me/pgimg/88
[ Article ] : http://bit.do/etags
γ°γ°γ°γ°γ°γ°
#AspMvc #AspCore #ETag
@ProgrammingTip
Telegram
Programming Tips Resources
Automatic ModelState Validation in ASP.NET MVC π₯
How many times have you seen or written code like this β»οΈ :
Stop repeating ModelState checks in your ASP.NET MVC controller actions. β
Wouldnβt it be nice if all we had to do was like this ? β‘οΈ
https://t.me/pgimg/89
[ Article ] : http://bit.do/msta
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode
@ProgrammingTip
How many times have you seen or written code like this β»οΈ :
[HttpPost]
public ActionResult Index(SomeModel model)
{
if (ModelState.IsValid)
{
return View();
}
// do something
return RedirectToAction("index");
}
Stop repeating ModelState checks in your ASP.NET MVC controller actions. β
Wouldnβt it be nice if all we had to do was like this ? β‘οΈ
[HttpPost]
[ValidateModelState]
public ActionResult Index(SomeModel model)
{
// if we get here, ModelState is valid
// save to db etc.
return RedirectToAction("index");
}
https://t.me/pgimg/89
[ Article ] : http://bit.do/msta
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode
@ProgrammingTip
Telegram
Programming Tips Resources
The state of JavaScript in 2017 π₯
A few years back, a JavaScript survey would've been a simple matter.
Question 1 :
Are you using jQueryβ
Question 2 :
Any commentsβBoom, doneβοΈ
But as we all know, things have changed. β¨
The JavaScript ecosystem is richer than ever, and even the most experienced developer can start to hesitate when considering the multitude of options available at every stage.
There's data from over 20,000 developers, asking them questions on topics ranging from front-end frameworks and state management, to build tools and testing libraries. β
https://t.me/pgimg/90
[ Website ] : https://stateofjs.com
γ°γ°γ°γ°γ°γ°
#JavaScript #Analytics
@ProgrammingTip
A few years back, a JavaScript survey would've been a simple matter.
Question 1 :
Are you using jQueryβ
Question 2 :
Any commentsβBoom, doneβοΈ
But as we all know, things have changed. β¨
The JavaScript ecosystem is richer than ever, and even the most experienced developer can start to hesitate when considering the multitude of options available at every stage.
There's data from over 20,000 developers, asking them questions on topics ranging from front-end frameworks and state management, to build tools and testing libraries. β
https://t.me/pgimg/90
[ Website ] : https://stateofjs.com
γ°γ°γ°γ°γ°γ°
#JavaScript #Analytics
@ProgrammingTip
Telegram
Programming Tips Resources
How we do MVC β View models π
The ViewModel is a central aspect of our MVC architecture. π
One of the first dilemmas facing MVC developers is to decide what the βMβ in MVC means in ASP.NET MVC. π€
In Rails, this is fairly clear, the M is ActiveRecord (by default). π
But in ASP.NET MVC, the βMβ is silentβοΈ
Its out-of-the-box architecture offers no guidelines nor advice on what the M should be. βοΈ
Should it be an entityβ
Data access objectβ
DTOβ
Something elseβ
https://t.me/pgimg/91
[ Website ] : http://bit.do/mvvm
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #BestPractices
@ProgrammingTip
The ViewModel is a central aspect of our MVC architecture. π
One of the first dilemmas facing MVC developers is to decide what the βMβ in MVC means in ASP.NET MVC. π€
In Rails, this is fairly clear, the M is ActiveRecord (by default). π
But in ASP.NET MVC, the βMβ is silentβοΈ
Its out-of-the-box architecture offers no guidelines nor advice on what the M should be. βοΈ
Should it be an entityβ
Data access objectβ
DTOβ
Something elseβ
https://t.me/pgimg/91
[ Website ] : http://bit.do/mvvm
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #BestPractices
@ProgrammingTip
Telegram
Programming Tips Resources
Working With Zip Files In ASP.NET MVC π
Since ASP.NET 4.5, zipping and unzipping files can be done with classes from within the .NET framework. π
Despite that, nearly all examples that illustrate working with zip files in ASP.NET applications feature third party open source compression libraries. πΎ
This short article attempts to correct that by demonstrating the use of the System.IO.Compression classes in an ASP.NET MVC application to β :
1οΈβ£ Unpack an uploaded zip file
2οΈβ£ Create one for download
https://t.me/pgimg/92
[ Article ] : http://bit.do/aspzip
γ°γ°γ°γ°γ°γ°
#AspMvc #Compression
@ProgrammingTip
Since ASP.NET 4.5, zipping and unzipping files can be done with classes from within the .NET framework. π
Despite that, nearly all examples that illustrate working with zip files in ASP.NET applications feature third party open source compression libraries. πΎ
This short article attempts to correct that by demonstrating the use of the System.IO.Compression classes in an ASP.NET MVC application to β :
1οΈβ£ Unpack an uploaded zip file
2οΈβ£ Create one for download
https://t.me/pgimg/92
[ Article ] : http://bit.do/aspzip
γ°γ°γ°γ°γ°γ°
#AspMvc #Compression
@ProgrammingTip
Telegram
Programming Tips Resources
ASP.NET MVC Best Practices and Guidelines β
While most developers were used to WebForms and Microsoft's stock controls, when developers moved to ASP.NET MVC, a number of developers were shocked because there wasn't enough meat for this to be a full-featured release. π€
Some of the guidelines list below are based on my own experiences over the years since 2008. π
https://t.me/pgimg/93
[ Website ] : http://bit.do/aspbst
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #BestPractices
@ProgrammingTip
While most developers were used to WebForms and Microsoft's stock controls, when developers moved to ASP.NET MVC, a number of developers were shocked because there wasn't enough meat for this to be a full-featured release. π€
Some of the guidelines list below are based on my own experiences over the years since 2008. π
https://t.me/pgimg/93
[ Website ] : http://bit.do/aspbst
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #BestPractices
@ProgrammingTip
Telegram
Programming Tips Resources
Auth0: Introduction and Initial ASP.NET MVC Project Setup π
The big selling points for Auth0, and other services like it, are that it removes you from having to worry about Auth/User Management and get to the part of your applications that bring value to your customers. π₯
As with Identity Server, Auth0 can use OpenID Connect (as well as a lot of other protocols), single sign-on and API Access Control. β
https://t.me/pgimg/94
[ Article ] : http://bit.do/auas
γ°γ°γ°γ°γ°γ°
#AspMvc #Auth0 #Authentication
@ProgrammingTip
The big selling points for Auth0, and other services like it, are that it removes you from having to worry about Auth/User Management and get to the part of your applications that bring value to your customers. π₯
As with Identity Server, Auth0 can use OpenID Connect (as well as a lot of other protocols), single sign-on and API Access Control. β
https://t.me/pgimg/94
[ Article ] : http://bit.do/auas
γ°γ°γ°γ°γ°γ°
#AspMvc #Auth0 #Authentication
@ProgrammingTip
Telegram
Programming Tips Resources
Architecting Services with Design Patterns π
As the number of your services expands you're going to need to start thinking about how to organize them. π
Applying these two design patterns can help, provided you understand all their variations. β
With the current set of tools that come with the Microsoft .NET Framework, it's easy to create a service. βοΈ
But it's also easy to create what both Nayaki Nayyar and Benjamin Moreland described as a "junk drawer of services." πΎ
If you're going to avoid that as the number of services in your organization increases, then you need to think about your architecture. π€
https://t.me/pgimg/95
[ Article ] : http://bit.do/asdp
γ°γ°γ°γ°γ°γ°
#CleanCode #DesignPatterns
@ProgrammingTip
As the number of your services expands you're going to need to start thinking about how to organize them. π
Applying these two design patterns can help, provided you understand all their variations. β
With the current set of tools that come with the Microsoft .NET Framework, it's easy to create a service. βοΈ
But it's also easy to create what both Nayaki Nayyar and Benjamin Moreland described as a "junk drawer of services." πΎ
If you're going to avoid that as the number of services in your organization increases, then you need to think about your architecture. π€
https://t.me/pgimg/95
[ Article ] : http://bit.do/asdp
γ°γ°γ°γ°γ°γ°
#CleanCode #DesignPatterns
@ProgrammingTip
Telegram
Programming Tips Resources
5 More C# Extension Methods for the Stocking β A Bonus Method For Enums ! π₯
1οΈβ£ ToInt() β
We always have the familiar .ToString(), but what happens when we want to convert a simple string to an integerβ
πΉπΈπΉ
2οΈβ£ OrdinalSuffix() β
This extension method places a 'th', 'st', 'nd', 'rd', or 'th' to the end of the number. π
πΈπΉπΈ
3οΈβ£ Occurrence() β
This just counts the number of occurrences in a string. π
πΉπΈπΉ
4οΈβ£ Join<T>()/Join() β
With this extension method, you can take an array or List<string>() and make a comma-delimited list in no time or build a broken-up URL with dashes as the URL name. β
πΈπΉπΈ
5οΈβ£ ToQueryString() β
Have you ever wanted to take a NameValueCollection and convert it into a query string for a URL ? π
πΉπΈπΉ
β‘οΈ Enums.ToList<T>() - Bonus Method β
This Enums.ToList<T> static method is meant to take enumerations with description attributes and convert them into a NameValueCollection for possibly a dropdown. π
πΈπΉπΈ
https://t.me/pgimg/96
[ Article ] : http://bit.do/chex
γ°γ°γ°γ°γ°γ°
#CSharp #ExtensionMethod
@ProgrammingTip
1οΈβ£ ToInt() β
We always have the familiar .ToString(), but what happens when we want to convert a simple string to an integerβ
πΉπΈπΉ
2οΈβ£ OrdinalSuffix() β
This extension method places a 'th', 'st', 'nd', 'rd', or 'th' to the end of the number. π
πΈπΉπΈ
3οΈβ£ Occurrence() β
This just counts the number of occurrences in a string. π
πΉπΈπΉ
4οΈβ£ Join<T>()/Join() β
With this extension method, you can take an array or List<string>() and make a comma-delimited list in no time or build a broken-up URL with dashes as the URL name. β
πΈπΉπΈ
5οΈβ£ ToQueryString() β
Have you ever wanted to take a NameValueCollection and convert it into a query string for a URL ? π
πΉπΈπΉ
β‘οΈ Enums.ToList<T>() - Bonus Method β
This Enums.ToList<T> static method is meant to take enumerations with description attributes and convert them into a NameValueCollection for possibly a dropdown. π
πΈπΉπΈ
https://t.me/pgimg/96
[ Article ] : http://bit.do/chex
γ°γ°γ°γ°γ°γ°
#CSharp #ExtensionMethod
@ProgrammingTip
Telegram
Programming Tips Resources
JavaScript β Null vs. Undefined β‘οΈ
Learn the differences and similarities between null and undefined in JavaScript. βοΈ
At first glance, null and undefined may seem the same, but they are far from it. βοΈ
This article will explore the differences and similarities between null and undefined in JavaScript. β
https://t.me/pgimg/97
[ Article ] : http://bit.do/nullu
γ°γ°γ°γ°γ°γ°
#JavaScript #Null
@ProgrammingTip
Learn the differences and similarities between null and undefined in JavaScript. βοΈ
At first glance, null and undefined may seem the same, but they are far from it. βοΈ
This article will explore the differences and similarities between null and undefined in JavaScript. β
https://t.me/pgimg/97
[ Article ] : http://bit.do/nullu
γ°γ°γ°γ°γ°γ°
#JavaScript #Null
@ProgrammingTip
Telegram
Programming Tips Resources
Use T4MVC to Remove Magic Strings in ASP.NET MVC Apps π©
ASP.NET MVC has a fascination with magic strings. β
Basically any time you need to specify an action, a view, or controller, you use a magic string β¨ :
The problem with magic strings is the same problem that ViewBag has β οΈ :
1οΈβ£ There's no type checking.
2οΈβ£ The developer won't catch these errors until runtime, and sometimes not at all.
πΉπΈπΉπΈ
T4MVC aims to remove magic strings from MVC and replace them with strongly-typed ActionResults. β
It adds a bunch more overloads to methods such as ActionLink(), BeginForm(), and RedirectToAction() so that they can now accept ActionResults as parameters. π
Thereby making them strongly-typed and removing their dependency on magic strings. π
Most importantly, it means we can take the above code samples and refactor them to look like this π€π» :
https://t.me/pgimg/98
[ Article ] : http://bit.do/t4mvc
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #T4MVC
@ProgrammingTip
ASP.NET MVC has a fascination with magic strings. β
Basically any time you need to specify an action, a view, or controller, you use a magic string β¨ :
return RedirectToAction("Index", "Home", new { id = 4 });
return View("Details");
@Html.ActionLink("Back to details", "Detals", "User", new {id = 12}, new {@class = "backlink"});
@using (Html.BeginForm("Details", "User", FormMethod.Post))The problem with magic strings is the same problem that ViewBag has β οΈ :
1οΈβ£ There's no type checking.
2οΈβ£ The developer won't catch these errors until runtime, and sometimes not at all.
πΉπΈπΉπΈ
T4MVC aims to remove magic strings from MVC and replace them with strongly-typed ActionResults. β
It adds a bunch more overloads to methods such as ActionLink(), BeginForm(), and RedirectToAction() so that they can now accept ActionResults as parameters. π
Thereby making them strongly-typed and removing their dependency on magic strings. π
Most importantly, it means we can take the above code samples and refactor them to look like this π€π» :
return RedirectToAction(MVC.Home.Index(4));
return View(MVC.User.Views.ViewNames.Details);
@Html.ActionLink("Back to details", MVC.User.Details(12), new {@class = "backlink"});
@using (Html.BeginForm(MVC.User.Details(), FormMethod.Post))
https://t.me/pgimg/98
[ Article ] : http://bit.do/t4mvc
γ°γ°γ°γ°γ°γ°
#AspMvc #CleanCode #T4MVC
@ProgrammingTip
Telegram
Programming Tips Resources
Q&A: Successful Developer Career Strategies π
The field of computer science is huge, far too wide for anyone to master in all areas. π
We all need to make difficult choices about how and where we spend our time. β°
Itβs often said that in order to be successful in this industry you need to specialize. π€
But itβs also often said that you need a wide range of experience. β
So what is more important : breadth or depth βοΈ
This is a very difficult question, and is why I asked for the advice of some of the very brightest minds in our industry. π
Our expert panel is comprised of the following seven developers π₯ :
β’ Scott Allen
β’ Mark Seemann
β’ Julie Lerman
β’ Kyle Simpson
β’ Troy Hunt
β’ Oren Eini
β’ Cory House
https://t.me/pgimg/99
[ Article ] : http://bit.do/qadev
γ°γ°γ°γ°γ°γ°
#QA #Strategy
@ProgrammingTip
The field of computer science is huge, far too wide for anyone to master in all areas. π
We all need to make difficult choices about how and where we spend our time. β°
Itβs often said that in order to be successful in this industry you need to specialize. π€
But itβs also often said that you need a wide range of experience. β
So what is more important : breadth or depth βοΈ
This is a very difficult question, and is why I asked for the advice of some of the very brightest minds in our industry. π
Our expert panel is comprised of the following seven developers π₯ :
β’ Scott Allen
β’ Mark Seemann
β’ Julie Lerman
β’ Kyle Simpson
β’ Troy Hunt
β’ Oren Eini
β’ Cory House
https://t.me/pgimg/99
[ Article ] : http://bit.do/qadev
γ°γ°γ°γ°γ°γ°
#QA #Strategy
@ProgrammingTip
Telegram
Programming Tips Resources
ASP.NET Core Interview Questions πΌ
This post is about ASP.NET Core Interview Questions. βοΈ
These questions are directly tied to ASP.NET Core. β
They are not meant to serve as only questions that you would ask a candidate during an interview. β
Use these to assess if the candidate has any knowledge about ASP.NET Core. π
The questions should serve as guidelines for core ASP.NET Core concepts that candidate should be familiar with. πͺ
https://t.me/pgimg/100
[ Article ] : http://bit.do/aspint
γ°γ°γ°γ°γ°γ°
#AspMvc #AspCore #Core #Interview
@ProgrammingTip
This post is about ASP.NET Core Interview Questions. βοΈ
These questions are directly tied to ASP.NET Core. β
They are not meant to serve as only questions that you would ask a candidate during an interview. β
Use these to assess if the candidate has any knowledge about ASP.NET Core. π
The questions should serve as guidelines for core ASP.NET Core concepts that candidate should be familiar with. πͺ
https://t.me/pgimg/100
[ Article ] : http://bit.do/aspint
γ°γ°γ°γ°γ°γ°
#AspMvc #AspCore #Core #Interview
@ProgrammingTip
Telegram
Programming Tips Resources
Generating Friendly URLs in ASP.NET MVC π¦
Have a look at the following URL π :
Do you have any idea what the URL is pointing to by just looking at itβMost likely not.
Now look at this one π :
Any ideaβWell it would seem that it is an article about a hands-on with the Panasonic Lumix DMX-GX8. π₯
In todayβs blog post I would like to demonstrate how to generate βfriendly URLsβ in your ASP.NET applications. β
Friendly not just in the sense that someone can look at it and figure out what the URL is pointing to, but more importantly friendly for search engines. π
https://t.me/pgimg/101
[ Article ] : http://bit.do/aspseo
γ°γ°γ°γ°γ°γ°
#AspMvc #SEO
@ProgrammingTip
Have a look at the following URL π :
http://www.amazon.com/gp/product/1617292397/ref=s9_psimh_gw_p14_d4_i1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=desktop-1&pf_rd_r=0TFM5Q6WM6KD9NPNG9G7&pf_rd_t=36701&pf_rd_p=2079475242&pf_rd_i=desktop
Do you have any idea what the URL is pointing to by just looking at itβMost likely not.
Now look at this one π :
http://www.dpreview.com/articles/9485436827/the-big-beast-hands-on-with-the-panasonic-lumix-dmc-gx8
Any ideaβWell it would seem that it is an article about a hands-on with the Panasonic Lumix DMX-GX8. π₯
In todayβs blog post I would like to demonstrate how to generate βfriendly URLsβ in your ASP.NET applications. β
Friendly not just in the sense that someone can look at it and figure out what the URL is pointing to, but more importantly friendly for search engines. π
https://t.me/pgimg/101
[ Article ] : http://bit.do/aspseo
γ°γ°γ°γ°γ°γ°
#AspMvc #SEO
@ProgrammingTip
Telegram
Programming Tips Resources