Are iframes considered 'bad practice'?
Tag : html , By : user119985
Date : March 29 2020, 07:55 AM
should help you out As with all technologies, it has its ups and downs. If you are using an iframe to get around a properly developed site, then of course it is bad practice. However sometimes an iframe is acceptable. One of the main problems with an iframe has to do with bookmarks and navigation. If you are using it to simply embed a page inside your content, I think that is fine. That is what an iframe is for.
|
Are using modules in VB.NET considered bad practice?
Date : March 29 2020, 07:55 AM
I hope this helps you . Centro is right that a Module (or a NotInheritable Class with Shared members) is the closest equivalent to a C# static class. So technically, nothing is wrong with it as it's just one of VB's ways of creating this type of class. For example, you cannot say Public Shared Class Settings in VB as you cannot put the Shared keyword on a class. On its own I wouldn't call it bad practice if a specific circumstance calls for a Module, but otherwise a Module (or other static class equivalents) likely is not the design choice you want for having loosely coupled, testable code. Additionally, while a NotInheritable Class with Shared members is more descriptive than just saying Module, there is at least one circumstance where a Module must be used instead. Imports System.Runtime.CompilerServices
Public Module StringExtensions
<Extension()> _
Public Function Remove( _
ByVal input As String, _
ByVal subStrings As String()) As String
Return String.Join("", input.Split(subStrings, StringSplitOptions.None)).Trim()
End Function
End Module
public static class StringExtensions
{
public string Remove(this string input, string[] subStrings)
{
return string.Join("", input.Split(subStrings, StringSplitOptions.None)).Trim();
}
}
|
Why is this certain type of code considered to be good programming practice and why some is considered bad?
Date : March 29 2020, 07:55 AM
wish help you to fix your issue During common programming constructs I have seen that for eg. , Let's take an isolated look at your Artframe class: public Artframe(Drawing drawing)
{ this.drawing = drawing; }
public Artframe()
{ this.drawing = new Drawing(); }
|
is using `v-on` considered as bad practice?
Date : March 29 2020, 07:55 AM
may help you . You might be concerned that this whole event listening approach violates the good old rules about “separation of concerns”. Rest assured - since all Vue handler functions and expressions are strictly bound to the ViewModel that’s handling the current view, it won’t cause any maintenance difficulty. In fact, there are several benefits in using v-on:
|
Is this considered a bad practice in C#?
Tag : chash , By : Si Gardner
Date : March 29 2020, 07:55 AM
|