Don't forget to understand these essential SQL topics if you're just starting out.
1. SQL Basics
- SELECT Statement:
It's like asking the database for specific information.
- FROM Clause:
Tells the database where to look for that information.
- WHERE Clause:
Filters out the stuff you don't need.
- ORDER BY Clause:
Arranges the results in a specific order.
2. Data Manipulation
- INSERT: Adds new data.
- UPDATE: Changes existing data.
- DELETE: Removes data.
- MERGE: Combines these actions.
3. Data Definition
- CREATE TABLE: Makes a new table.
- ALTER TABLE: Edits an existing table.
- DROP TABLE: Deletes a table.
- INDEXES: Helps with finding data quickly.
4. Constraints
- PRIMARY KEY: Ensures each row is unique.
- FOREIGN KEY: Keeps data relationships intact.
- UNIQUE: Ensures values are unique.
- DEFAULT: Sets a value if none is given.
5. Joins (Really Important)
- INNER JOIN: Combines data from different tables.
- LEFT JOIN: Gets all data from one table and matching data from another.
- RIGHT JOIN: Opposite of LEFT JOIN.
- FULL JOIN: Gets data if it's in either table.
- SELF JOIN: Links data within the same table.
6. Subqueries:
- Correlated Subqueries: Subqueries connected to the main query.
- Scalar Subqueries: Subqueries that return a single value.
- Subquery in FROM Clause: Using a subquery as a table.
7. Aggregation Functions:
- SUM, COUNT, AVG, MAX, MIN: Math on groups of data.
- GROUP BY: Groups data before doing math.
- HAVING: Filters groups based on math results.
8. Views:
- CREATE VIEW: Makes a pretend table.
- ALTER VIEW: Changes the pretend table.
- DROP VIEW: Deletes the pretend table.
9. Transactions:
- BEGIN TRANSACTION, COMMIT, ROLLBACK: Ensures data stays safe and consistent.
- ACID Properties (Important): Rules for safe transactions.
10. Database Security:
- GRANT and REVOKE: Decides who can do what.
- Roles: Groups of permissions for users.
11. Normalization (Important):
- 1NF, 2NF, 3NF, BCNF, 4NF:
Ways to organize data for efficiency and accuracy.
12. Indexes:
- Clustered vs. Non-Clustered Indexes: Different ways to find data quickly.
13. Database Management Systems (DBMS):
- Different software tools for working with databases, like MySQL etc.
1. SQL Basics
- SELECT Statement:
It's like asking the database for specific information.
- FROM Clause:
Tells the database where to look for that information.
- WHERE Clause:
Filters out the stuff you don't need.
- ORDER BY Clause:
Arranges the results in a specific order.
2. Data Manipulation
- INSERT: Adds new data.
- UPDATE: Changes existing data.
- DELETE: Removes data.
- MERGE: Combines these actions.
3. Data Definition
- CREATE TABLE: Makes a new table.
- ALTER TABLE: Edits an existing table.
- DROP TABLE: Deletes a table.
- INDEXES: Helps with finding data quickly.
4. Constraints
- PRIMARY KEY: Ensures each row is unique.
- FOREIGN KEY: Keeps data relationships intact.
- UNIQUE: Ensures values are unique.
- DEFAULT: Sets a value if none is given.
5. Joins (Really Important)
- INNER JOIN: Combines data from different tables.
- LEFT JOIN: Gets all data from one table and matching data from another.
- RIGHT JOIN: Opposite of LEFT JOIN.
- FULL JOIN: Gets data if it's in either table.
- SELF JOIN: Links data within the same table.
6. Subqueries:
- Correlated Subqueries: Subqueries connected to the main query.
- Scalar Subqueries: Subqueries that return a single value.
- Subquery in FROM Clause: Using a subquery as a table.
7. Aggregation Functions:
- SUM, COUNT, AVG, MAX, MIN: Math on groups of data.
- GROUP BY: Groups data before doing math.
- HAVING: Filters groups based on math results.
8. Views:
- CREATE VIEW: Makes a pretend table.
- ALTER VIEW: Changes the pretend table.
- DROP VIEW: Deletes the pretend table.
9. Transactions:
- BEGIN TRANSACTION, COMMIT, ROLLBACK: Ensures data stays safe and consistent.
- ACID Properties (Important): Rules for safe transactions.
10. Database Security:
- GRANT and REVOKE: Decides who can do what.
- Roles: Groups of permissions for users.
11. Normalization (Important):
- 1NF, 2NF, 3NF, BCNF, 4NF:
Ways to organize data for efficiency and accuracy.
12. Indexes:
- Clustered vs. Non-Clustered Indexes: Different ways to find data quickly.
13. Database Management Systems (DBMS):
- Different software tools for working with databases, like MySQL etc.
DATA STRUCTURES WITH C NOTES by CoderBaba.pdf
1.3 MB
Data Structure with C Handwritten Notes PDF #coderbaba #DataStructures
#CProgramming
#ProgrammingNotes
#ComputerScience
#CodingTips
#LearnProgramming
#CSStudents
#TechEducation
#HandwrittenNotes
#ProgrammingResources
#CodingCommunity
#AlgorithmDesign
#SoftwareDevelopment
#CodeLearning
#TechSkills
#CS
#ProgrammingJourney
#DataStructuresInC
#CodeWithC
#StudyNotes
#CProgramming
#ProgrammingNotes
#ComputerScience
#CodingTips
#LearnProgramming
#CSStudents
#TechEducation
#HandwrittenNotes
#ProgrammingResources
#CodingCommunity
#AlgorithmDesign
#SoftwareDevelopment
#CodeLearning
#TechSkills
#CS
#ProgrammingJourney
#DataStructuresInC
#CodeWithC
#StudyNotes
π New Video Alert! π
Are you ready to level up your ASP. NET MVC skills? π― Our latest video, "Understanding TempData in ASP.NET MVC: Tips and Tricks," is here to help you become an MVC master! π
https://youtu.be/rZtYhfbEH4M
Are you ready to level up your ASP. NET MVC skills? π― Our latest video, "Understanding TempData in ASP.NET MVC: Tips and Tricks," is here to help you become an MVC master! π
https://youtu.be/rZtYhfbEH4M
YouTube
ASP.NET MVC Tutorial Part-22: Mastering TempData in ASP.NET MVC Best Practices Coderbaba
TempData in ASP.NET MVC: A Step-by-Step Tutorial #coderbaba #mvc #TempData
In this in-depth ASP.NET MVC tutorial, we dive into the world of TempData! Have you ever wondered how to pass data between different actions or controllers in your MVC application?β¦
In this in-depth ASP.NET MVC tutorial, we dive into the world of TempData! Have you ever wondered how to pass data between different actions or controllers in your MVC application?β¦
Hello, everyone! π
I'm excited to share a fantastic resource with you all. You can now download the complete shopping website project along with its source code! π»π
π https://bit.ly/3Q1hDjc
This project is perfect for anyone looking to learn web development, e-commerce, or just exploring how a shopping website is built from scratch. It includes all the necessary code and features to get you started on your web development journey. π
Happy coding! π€β¨
https://bit.ly/3Q07Hqd
I'm excited to share a fantastic resource with you all. You can now download the complete shopping website project along with its source code! π»π
π https://bit.ly/3Q1hDjc
This project is perfect for anyone looking to learn web development, e-commerce, or just exploring how a shopping website is built from scratch. It includes all the necessary code and features to get you started on your web development journey. π
Happy coding! π€β¨
https://bit.ly/3Q07Hqd
Myinstamojo
E Shopping Dynamic ASP.NET Website with SQL Server Database Complete Final Year Project
Day23 ASP.NET MVC5 Session.pdf
443.2 KB
Part 23: Understanding Sessions in ASP. NET MVC PDF Note video link: https://youtu.be/RkgAsjnE9go
π Exciting News for our Community! π
Are you eager to master ASP. NET and C# programming? Look no further! π
Introducing our latest offering: Complete ASP. NET C# Tutorial Handwritten PDF Notes by CoderBaba! ππ»
π https://coderbaba.myinstamojo.com/product/4105772/complete-aspnet-c-pdf-notes-download-now
β¨ Why You'll Love These Notes: β¨
Comprehensive Content: Our notes cover the entire ASP. NET and C# tutorial series, making it easy for you to learn and reference essential concepts.
Handwritten for Clarity: CoderBaba's expert insights are handwritten for a clear and engaging learning experience, making complex topics easier to grasp.
Don't miss out on this fantastic resource to boost your ASP. NET and C# skills. Start your journey to becoming a proficient developer today!
π Like this post if you're excited about these notes!
π Share it with your fellow learners to spread the word!
π¬ Comment below if you've downloaded the notes and let us know how they've helped you.
Happy learning, ! π»πβ¨
Are you eager to master ASP. NET and C# programming? Look no further! π
Introducing our latest offering: Complete ASP. NET C# Tutorial Handwritten PDF Notes by CoderBaba! ππ»
π https://coderbaba.myinstamojo.com/product/4105772/complete-aspnet-c-pdf-notes-download-now
β¨ Why You'll Love These Notes: β¨
Comprehensive Content: Our notes cover the entire ASP. NET and C# tutorial series, making it easy for you to learn and reference essential concepts.
Handwritten for Clarity: CoderBaba's expert insights are handwritten for a clear and engaging learning experience, making complex topics easier to grasp.
Don't miss out on this fantastic resource to boost your ASP. NET and C# skills. Start your journey to becoming a proficient developer today!
π Like this post if you're excited about these notes!
π Share it with your fellow learners to spread the word!
π¬ Comment below if you've downloaded the notes and let us know how they've helped you.
Happy learning, ! π»πβ¨
When preparing for an interview for ASP. NET MVC5, it's essential to cover a range of topics to demonstrate your knowledge and skills effectively. Here's a list of important topics that are commonly asked about in ASP. NET MVC5 interviews:
MVC Architecture: Understand the Model-View-Controller architecture and how it separates concerns in web applications.
Routing: Explain how routing works in ASP. NET MVC and how to configure custom routes.
Controllers: Discuss the role of controllers, action methods, and controller attributes in ASP. NET MVC.
Views: Explain Razor syntax, view models, and partial views in ASP. NET MVC.
Models: Describe the purpose of models, data annotations, and data validation.
HTML Helpers: Understand HTML helpers for generating form elements and other HTML controls.
Data Access: Discuss Entity Framework and other data access techniques in ASP. NET MVC.
Authentication and Authorization: Explain how to implement authentication and authorization using ASP. NET Identity or other methods.
Filters: Discuss action filters, result filters, and authorization filters in MVC.
Dependency Injection: Understand the importance of dependency injection and how to use IoC containers like Unity or Autofac.
Validation: Explain server-side and client-side validation in ASP. NET MVC.
Areas: Discuss how to organize large applications using areas in ASP. NET MVC.
Bundling and Minification: Describe how to optimize front-end resources using bundling and minification.
Web API: Understand ASP. NET Web API and its integration with MVC for building RESTful services.
Testing: Discuss unit testing, integration testing, and automated testing strategies in ASP. NET MVC.
Error Handling: Explain how to handle errors and exceptions gracefully in ASP. NET MVC applications.
Performance Optimization: Discuss techniques for optimizing the performance of ASP. NET MVC applications.
Deployment: Explain deployment strategies for ASP. NET MVC applications, including IIS configuration and publishing.
Security Best Practices: Discuss security considerations and best practices for securing ASP. NET MVC applications.
Latest Features: Stay updated on the latest features and enhancements introduced in ASP. NET MVC5, including any relevant updates or versions
MVC Architecture: Understand the Model-View-Controller architecture and how it separates concerns in web applications.
Routing: Explain how routing works in ASP. NET MVC and how to configure custom routes.
Controllers: Discuss the role of controllers, action methods, and controller attributes in ASP. NET MVC.
Views: Explain Razor syntax, view models, and partial views in ASP. NET MVC.
Models: Describe the purpose of models, data annotations, and data validation.
HTML Helpers: Understand HTML helpers for generating form elements and other HTML controls.
Data Access: Discuss Entity Framework and other data access techniques in ASP. NET MVC.
Authentication and Authorization: Explain how to implement authentication and authorization using ASP. NET Identity or other methods.
Filters: Discuss action filters, result filters, and authorization filters in MVC.
Dependency Injection: Understand the importance of dependency injection and how to use IoC containers like Unity or Autofac.
Validation: Explain server-side and client-side validation in ASP. NET MVC.
Areas: Discuss how to organize large applications using areas in ASP. NET MVC.
Bundling and Minification: Describe how to optimize front-end resources using bundling and minification.
Web API: Understand ASP. NET Web API and its integration with MVC for building RESTful services.
Testing: Discuss unit testing, integration testing, and automated testing strategies in ASP. NET MVC.
Error Handling: Explain how to handle errors and exceptions gracefully in ASP. NET MVC applications.
Performance Optimization: Discuss techniques for optimizing the performance of ASP. NET MVC applications.
Deployment: Explain deployment strategies for ASP. NET MVC applications, including IIS configuration and publishing.
Security Best Practices: Discuss security considerations and best practices for securing ASP. NET MVC applications.
Latest Features: Stay updated on the latest features and enhancements introduced in ASP. NET MVC5, including any relevant updates or versions
MVC Interview Questions:
----------------------------------
1. What is MVC (Model View Controller)?
2. What are the advantages of MVC?
3. Explain MVC application life cycle?
4. List out different return types of a controller action method?
5. What are the Filters in MVC?
6. What are Action Filters in MVC?
7. Explain what is routing in MVC? What are the three segments for routing important?
8. What is Route in MVC? What is Default Route in MVC?
9. Mention what is the difference between Temp data, View, and View Bag?
10. What is Partial View in MVC?
11. Explain what is the difference between View and Partial View?
12. What are HTML helpers in MVC?
13. Explain attribute based routing in MVC?
14. What is TempData in MVC?
15. What is Razor in MVC?
16. Differences between Razor and ASPX View Engine in MVC?
17. What are the Main Razor Syntax Rules?
18. How do you implement Forms authentication in MVC?
19. Explain Areas in MVC?
20. Explain the need of display mode in MVC?
21. Explain the concept of MVC Scaffolding?
22. What is Route Constraints in MVC?
23. What is Razor View Engine in MVC?
24. What is Output Caching in MVC?
25. What is Bundling and Minification in MVC?
26. What is Validation Summary in MVC?
27. What is Database First Approach in MVC using Entity Framework?
28. What are the Folders in MVC application solutions?
29. What is difference between MVC and Web Forms?
30. What are the methods of handling an Error in MVC?
31. How can we pass the data From Controller To View In MVC?
32. What is Scaffolding in MVC?
33. What is ViewStart?
34. What is JsonResultType in MVC?
35. What is TempData?
36. How to use ViewBag?
37. What is the Difference between ViewBag & ViewData?
38. What is Data Annotation Validator Attributes in MVC?
39. How can we do Custom Error Page in MVC?
40. Server Side Validation in MVC?
41. What is the use of remote validation in MVC?
42. What are the Exception filters in MVC?
43. What is MVC HTML Helpers and its Methods?
44. Define Controller in MVC?
45. Explain Model in MVC?
46. Explain View in MVC?
47. What is Attribute Routing in MVC?
48. Explain RenderSection in MVC?
49. What is GET and POST Actions Types?
50. What's new in MVC 6?
----------------------------------
1. What is MVC (Model View Controller)?
2. What are the advantages of MVC?
3. Explain MVC application life cycle?
4. List out different return types of a controller action method?
5. What are the Filters in MVC?
6. What are Action Filters in MVC?
7. Explain what is routing in MVC? What are the three segments for routing important?
8. What is Route in MVC? What is Default Route in MVC?
9. Mention what is the difference between Temp data, View, and View Bag?
10. What is Partial View in MVC?
11. Explain what is the difference between View and Partial View?
12. What are HTML helpers in MVC?
13. Explain attribute based routing in MVC?
14. What is TempData in MVC?
15. What is Razor in MVC?
16. Differences between Razor and ASPX View Engine in MVC?
17. What are the Main Razor Syntax Rules?
18. How do you implement Forms authentication in MVC?
19. Explain Areas in MVC?
20. Explain the need of display mode in MVC?
21. Explain the concept of MVC Scaffolding?
22. What is Route Constraints in MVC?
23. What is Razor View Engine in MVC?
24. What is Output Caching in MVC?
25. What is Bundling and Minification in MVC?
26. What is Validation Summary in MVC?
27. What is Database First Approach in MVC using Entity Framework?
28. What are the Folders in MVC application solutions?
29. What is difference between MVC and Web Forms?
30. What are the methods of handling an Error in MVC?
31. How can we pass the data From Controller To View In MVC?
32. What is Scaffolding in MVC?
33. What is ViewStart?
34. What is JsonResultType in MVC?
35. What is TempData?
36. How to use ViewBag?
37. What is the Difference between ViewBag & ViewData?
38. What is Data Annotation Validator Attributes in MVC?
39. How can we do Custom Error Page in MVC?
40. Server Side Validation in MVC?
41. What is the use of remote validation in MVC?
42. What are the Exception filters in MVC?
43. What is MVC HTML Helpers and its Methods?
44. Define Controller in MVC?
45. Explain Model in MVC?
46. Explain View in MVC?
47. What is Attribute Routing in MVC?
48. Explain RenderSection in MVC?
49. What is GET and POST Actions Types?
50. What's new in MVC 6?
1. What is the sequence of execution of the ASP.NET page life cycle?
The simple way is to remember SILVER.
S (It is not counted)
I (Init)
L (Load)
V (Validate)
E (Event)
R (Render)
The simple way is to remember SILVER.
S (It is not counted)
I (Init)
L (Load)
V (Validate)
E (Event)
R (Render)
2. What is the difference between a Hash Table and a Dictionary?
The main differences are listed below.
Dictionary:
Returns an error if the key does not exist
No boxing and unboxing
Faster than a Hash table
Hashtable:
Returns NULL even if the key does not exist
Requires boxing and unboxing
Slower than a Dictionary
The main differences are listed below.
Dictionary:
Returns an error if the key does not exist
No boxing and unboxing
Faster than a Hash table
Hashtable:
Returns NULL even if the key does not exist
Requires boxing and unboxing
Slower than a Dictionary
What are the state management techniques used in .NET?
Client-side:
Hidden Field
View State
Cookies
Control State
Query Strings
Server-side
Session
In Proc mode
State Server mode
SQL Server mode
Custom mode
Application.
Client-side:
Hidden Field
View State
Cookies
Control State
Query Strings
Server-side
Session
In Proc mode
State Server mode
SQL Server mode
Custom mode
Application.
How to add a button dynamically to a grid view?
Button myButton = newButton();
myButton.Text = "Hai";
myGrid.Controls.Add(myButton);
Button myButton = newButton();
myButton.Text = "Hai";
myGrid.Controls.Add(myButton);
How to find a control inside a GridView?
ββββββββββββββββββ-
Button btnTest = (Button) myGrid.Rows[0].Cells[1].Controls[1].FindControl("myButton ");
ββββββββββββββββββ-
Button btnTest = (Button) myGrid.Rows[0].Cells[1].Controls[1].FindControl("myButton ");
How to remove a constraint from a table in SQL Server?
ALTER TABLE MyTab DROP CONSTRAINT myConstraint
ALTER TABLE MyTab DROP CONSTRAINT myConstraint
What is the difference between Java and JavaScript?
Answer
Java and JavaScript are both object-oriented programming languages, but JavaScript is an object-oriented scripting language. They are completely different programming languages with a small number of similarities. JavaScript is mainly used in Web pages. JavaScript follows almost all Java expression syntax and naming conventions. This is the main reason for calling it JavaScript. Unlike Java, JavaScript does not bother about the methods, variables, and classes. Java is much more complex than JavaScript. Let us compare Java and JavaScript in detail.
In Java, the source code is first converted into an intermediate code known as the byte. This byte code is non-readable by humans and is independent of any machine. Afterward, this byte code is interpreted by the interpreter (Java Virtual Machine). Since JavaScript is a scripting language, it is only interpreted. This is why making changes in a Java program are more complex than in a JavaScript program.
Java needs the Java Development Kit. JavaScript mainly requires a text editor.
Java is a strongly typed language. On the other hand, JavaScript is a loosely typed language.
JavaScript is a front-end language in a Web environment, whereas Java is a back-end language.
JavaScript is considered a part of the HTML file, so it is visible in the source file. Java applets are not a part of the HTML file, so they are not visible in the source file.
Java is very complex to learn due to its rules and restrictions, whereas JavaScript is easier to learn than Java.
The User Interface of JavaScript is developed in HTML and very easily understood. In contrast, the User Interface of Java is developed in AWT or Swing, which is very complex to understand.
The client side is more secure in Java compared to JavaScript.
Routines are known as methods and functions in Java and JavaScript.
Java supports Polymorphism, but JavaScript does not support Polymorphism.
Java uses classes and objects to make its code reusable easily, but this service is not available in JavaScript.
Answer
Java and JavaScript are both object-oriented programming languages, but JavaScript is an object-oriented scripting language. They are completely different programming languages with a small number of similarities. JavaScript is mainly used in Web pages. JavaScript follows almost all Java expression syntax and naming conventions. This is the main reason for calling it JavaScript. Unlike Java, JavaScript does not bother about the methods, variables, and classes. Java is much more complex than JavaScript. Let us compare Java and JavaScript in detail.
In Java, the source code is first converted into an intermediate code known as the byte. This byte code is non-readable by humans and is independent of any machine. Afterward, this byte code is interpreted by the interpreter (Java Virtual Machine). Since JavaScript is a scripting language, it is only interpreted. This is why making changes in a Java program are more complex than in a JavaScript program.
Java needs the Java Development Kit. JavaScript mainly requires a text editor.
Java is a strongly typed language. On the other hand, JavaScript is a loosely typed language.
JavaScript is a front-end language in a Web environment, whereas Java is a back-end language.
JavaScript is considered a part of the HTML file, so it is visible in the source file. Java applets are not a part of the HTML file, so they are not visible in the source file.
Java is very complex to learn due to its rules and restrictions, whereas JavaScript is easier to learn than Java.
The User Interface of JavaScript is developed in HTML and very easily understood. In contrast, the User Interface of Java is developed in AWT or Swing, which is very complex to understand.
The client side is more secure in Java compared to JavaScript.
Routines are known as methods and functions in Java and JavaScript.
Java supports Polymorphism, but JavaScript does not support Polymorphism.
Java uses classes and objects to make its code reusable easily, but this service is not available in JavaScript.
Advantages of JavaScript
Choose short and meaningful but readable variable names.
Avoid global variables whenever possible.
Use one global object to encapsulate any global variables you need.
Always use var to declare your variables.
Suppose you are using any loop like for each or while with the multiple statements, donβt forget to use starting curly braces and ending curly braces. Avoid starting and ending the curly braces if you are writing with a single statement.
Try to use the comments, if necessary, which will help you/others to understand better in later days.
Indent your code, so itβs readable.
Use curly braces to define the blocks of the code.
Comment your code.
Always end your statement with a semicolon.
Always write the statements in one line because if you split the statement into multiple lines, for each line, the compiler places a semicolon at the end of a line, which is wrong. Thus, you have to be more careful while writing.
If possible, try using Typescript/ JavaScript++ instead of JavaScript because it checks syntaxes at the compile time and supports OOPS features.
Maintains two kinds of JavaScript files, which are- a.Minimized files for production b.JavaScript file for development.
Be aware of an automatic semi-colon insertion that happens.
Use for each rather than for loop.
Maintain JavaScript files lightweight. Use a different JavaScript file. This can be possible for each functionality.
Declare the variables outside loops.
Reduce DOM operations.
e aware of the duplicate members (member field, member function).
Always place the script file reference at the end of the body tag.
Always separate JavaScript code from the HTML file.
Always use === comparison.
Always try to avoid Eval() because it decreases performance.
Always try to use {} instead of Object() because Object() decreases the performance.
If possible, use shorthand notations.
Use the Switch case instead of too many if-else blocks.
Use anonymous functions instead of naming the functions, if possible.
Cache your selectors in the variables for further use.
Do not mix CSS properties with JavaScript / JQuery. Instead, we can use CSS classes in JavaScript / JQuery.
Before writing any condition with the DOM element, first, check whether the DOM element is defined or not.
Choose short and meaningful but readable variable names.
Avoid global variables whenever possible.
Use one global object to encapsulate any global variables you need.
Always use var to declare your variables.
Suppose you are using any loop like for each or while with the multiple statements, donβt forget to use starting curly braces and ending curly braces. Avoid starting and ending the curly braces if you are writing with a single statement.
Try to use the comments, if necessary, which will help you/others to understand better in later days.
Indent your code, so itβs readable.
Use curly braces to define the blocks of the code.
Comment your code.
Always end your statement with a semicolon.
Always write the statements in one line because if you split the statement into multiple lines, for each line, the compiler places a semicolon at the end of a line, which is wrong. Thus, you have to be more careful while writing.
If possible, try using Typescript/ JavaScript++ instead of JavaScript because it checks syntaxes at the compile time and supports OOPS features.
Maintains two kinds of JavaScript files, which are- a.Minimized files for production b.JavaScript file for development.
Be aware of an automatic semi-colon insertion that happens.
Use for each rather than for loop.
Maintain JavaScript files lightweight. Use a different JavaScript file. This can be possible for each functionality.
Declare the variables outside loops.
Reduce DOM operations.
e aware of the duplicate members (member field, member function).
Always place the script file reference at the end of the body tag.
Always separate JavaScript code from the HTML file.
Always use === comparison.
Always try to avoid Eval() because it decreases performance.
Always try to use {} instead of Object() because Object() decreases the performance.
If possible, use shorthand notations.
Use the Switch case instead of too many if-else blocks.
Use anonymous functions instead of naming the functions, if possible.
Cache your selectors in the variables for further use.
Do not mix CSS properties with JavaScript / JQuery. Instead, we can use CSS classes in JavaScript / JQuery.
Before writing any condition with the DOM element, first, check whether the DOM element is defined or not.
What is the difference between βStored Procedureβ and βFunctionβ?
1. A procedure can have both input and output parameters, but a function can only have input parameters.
2. Inside a procedure we can use DML (INSERT/UPDATE/DELETE) statements. But inside a function we can't use DML statements.
3. We can't utilize a Stored Procedure in a Select statement. But we can use a function in a Select statement.
4. We can use a Try-Catch Block in a Stored Procedure but inside a function we can't use a Try-Catch block.
5. We can use transaction management in a procedure but we can't in a function.
6. We can't join a Stored Procedure but we can join functions.
7. Stored Procedures cannot be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section. But we can use a function anywhere.
8. A procedure can return 0 or n values (max 1024). But a function can return only 1 value that is mandatory.
9. A procedure can't be called from a function but we can call a function from a procedure.
1. A procedure can have both input and output parameters, but a function can only have input parameters.
2. Inside a procedure we can use DML (INSERT/UPDATE/DELETE) statements. But inside a function we can't use DML statements.
3. We can't utilize a Stored Procedure in a Select statement. But we can use a function in a Select statement.
4. We can use a Try-Catch Block in a Stored Procedure but inside a function we can't use a Try-Catch block.
5. We can use transaction management in a procedure but we can't in a function.
6. We can't join a Stored Procedure but we can join functions.
7. Stored Procedures cannot be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section. But we can use a function anywhere.
8. A procedure can return 0 or n values (max 1024). But a function can return only 1 value that is mandatory.
9. A procedure can't be called from a function but we can call a function from a procedure.