Tumgik
#Even if it has 0 relevance in relation to my behaviour and relationship with them
nancydsmithus · 5 years
Text
Testing Made Easier Via Framework Minimalism And Software Architecture
Testing Made Easier Via Framework Minimalism And Software Architecture
Ryan Kay
2019-08-22T13:00:59+02:002019-08-22T11:05:42+00:00
Like many other Android developers, my initial foray into testing on the platform lead me to be immediately confronted with a demoralizing degree of jargon. Further, what few examples I came across at the time (circa 2015) did not present practical use cases which may have inclined me to think that the cost to benefit ratio of learning a tool like Espresso in order to verify that a TextView.setText(…) was working properly, was a reasonable investment.
To make matters even worse, I did not have a working understanding of software architecture in theory or practice, which meant that even if I bothered to learn these frameworks, I would have been writing tests for monolithic applications comprised of a few god classes, written in spaghetti code. The punchline is that building, testing, and maintaining such applications is an exercise in self-sabotage quite regardless of your framework expertise; yet this realization only becomes clear after one has built a modular, loosely-coupled, and highly-cohesive application.
From here we arrive at one of the main points of discussion in this article, which I will summarize in plain language here: Among the primary benefits of applying the golden principles of software architecture (do not worry, I will discuss them with simple examples and language), is that your code can become easier to test. There are other benefits to applying such principles, but the relationship between software architecture and testing is the focus of this article.
However, for the sake of those who wish to understand why and how we test our code, we will first explore the concept of testing by analogy; without requiring you to memorize any jargon. Before getting deeper into the primary topic, we will also look at the question of why so many testing frameworks exist, for in examining this we may begin to see their benefits, limitations, and perhaps even an alternative solution.
Testing: Why And How
This section will not be new information for any seasoned tester, but perhaps you may enjoy this analogy nonetheless. Of course I am a software engineer, not a rocket engineer, but for a moment I will borrow an analogy which relates to designing and building objects both in physical space, and in the memory space of a computer. It turns out that while the medium changes, the process is in principle quite the same.
Suppose for a moment that we are rocket engineers, and our job is to build the first stage* rocket booster of a space shuttle. Suppose as well, that we have come up with a serviceable design for the first stage to begin building and testing in various conditions.
“First stage” refers to boosters which are fired when the rocket is first launched
Before we get to the process, I would like to point out why I prefer this analogy: You should not have any difficulty answering the question of why we are bothering to test our design before putting it in situations where human lives are at stake. While I will not try to convince you that testing your applications before launch could save lives (although it is possible depending on the nature of the application), it could save ratings, reviews, and your job. In the broadest sense, testing is the way in which we make sure that single parts, several components, and whole systems work before we employ them in situations where it is critically important for them to not fail.
Returning to the how aspect of this analogy, I will introduce the process by which engineers go about testing a particular design: redundancy. Redundancy is simple in principle: Build copies of the component to be tested to the same design specification as what you wish to use at launch time. Test these copies in an isolated environment which strictly controls for preconditions and variables. While this does not guarantee that the rocket booster will work properly when integrated in the whole shuttle, one can be certain that if it does not work in a controlled environment, it will be very unlikely to work at all.
Suppose that of the hundreds, or perhaps thousands of variables which the copies of the rocket design have been tested against, it comes down to ambient temperatures in which the rocket booster will be test fired. Upon testing at 35° Celsius, we see that everything functions without error. Again, the rocket is tested at roughly room temperature without failure. The final test will be at the lowest recorded temperature for the launch site, at -5° Celcius. During this final test, the rocket fires, but after a short period, the rocket flares up and shortly thereafter explodes violently; but fortunately in a controlled and safe environment.
At this point, we know that changes in temperature appear to be at least involved in the failed test, which leads us to consider what parts of the rocket booster may be adversely effected by cold temperatures. Over time, it is discovered that one key component, a rubber O-ring which serves to staunch the flow of fuel from one compartment to another, becomes rigid and ineffectual when exposed to temperatures approaching or below freezing.
It is possible that you have noticed that his analogy is loosely based on the tragic events of the Challenger space shuttle disaster. For those unfamiliar, the sad truth (insofar as investigations concluded) is that there were plenty of failed tests and warnings from the engineers, and yet administrative and political concerns spurred the launch to proceed regardless. In any case, whether or not you have memorized the term redundancy, my hope is that you have grasped the fundamental process for testing parts of any kind of system.
Concerning Software
Whereas the prior analogy explained the fundamental process for testing rockets (while taking plenty of liberty with the finer details), I will now summarize in a manner which is likely more relevant to you and I. While it is possible to test software by only launching it to devices once it is in any sort of deployable state, I suppose instead that we can apply the principle of redundancy to the individual parts of the application first.
This means that we create copies of the smaller parts of the whole application (commonly referred to as Units of software), set up an isolated test environment, and see how they behave based on whatever variables, arguments, events, and responses which may occur at runtime. Testing is truly as simple as that in theory, but the key to even getting to this process lies in building applications which are feasibly testable. This comes down to two concerns which we will look at in the next two sections. The first concern has to do with the test environment, and the second concern has to do with the way in which we structure applications.
Why Do We Need Frameworks?
In order to test a piece of software (henceforth referred to as a Unit, although this definition is deliberately an over-simplification), it is necessary to have some kind of testing environment which allows you to interact with your software at runtime. For those building applications to be executed purely on a JVM (Java Virtual Machine) environment, all that is required to write tests is a JRE (Java Runtime Environment). Take for example this very simple Calculator class:
class Calculator { private int add(int a, int b){ return a + b; } private int subtract(int a, int b){ return a - b; } }
In absence of any frameworks, as long as we have a test class which contains a mainfunction to actually execute our code, we can test it. As you may recall, the main function denotes the starting point of execution for a simple Java program. As for what we are testing for, we simply feed some test data into the Calculator’s functions and verify that it is performing basic arithmetic properly:
public class Main { public static void main(String[] args){ //create a copy of the Unit to be tested Calculator calc = new Calculator(); //create test conditions to verify behaviour int addTest = calc.add(2, 2); int subtractTest = calc.subtract(2, 2); //verify behaviour by assertion if (addTest == 4) System.out.println("addTest has passed."); else System.out.println("addTest has failed."); if (subtractTest == 0) System.out.println("subtractTest has passed."); else System.out.println("subtractTest has failed."); } }
Testing an Android application is of course, a completely different procedure. Although there is a main function buried deep within the source of the ZygoteInit.java file (the finer details of which are not important here), which is invoked prior to an Android application being launched on the JVM, even a junior Android developer ought to know that the system itself is responsible for calling this function; not the developer. Instead, the entry points for Android applications happen to be the Application class, and any Activity classes which the system can be pointed to via the AndroidManifest.xml file.
All of this is just a lead up to the fact that testing Units in an Android application presents a greater level of complexity, strictly because our testing environment must now account for the Android platform.
Taming The Problem Of Tight Coupling
Tight coupling is a term which describes a function, class, or application module which is dependent on particular platforms, frameworks, languages, and libraries. It is a relative term, meaning that our Calculator.java example is tightly coupled to the Java programming language and standard library, but that is the extent of its coupling. Along the same lines, the problem of testing classes which are tightly coupled to the Android platform, is that you must find a way to work with or around the platform.
For classes tightly coupled to the Android platform, you have two options. The first, is to simply deploy your classes to an Android device (physical or virtual). While I do suggest that you test deploy your application code before shipping it to production, this is a highly inefficient approach during the early and middle stages of the development process with respect to time.
A Unit, however technical a definition you prefer, is generally thought of as a single function in a class (although some expand the definition to include subsequent helper functions which are called internally by the initial single function call). Either way, Units are meant to be small; building, compiling, and deploying an entire application to test a single Unit is to miss the point of testing in isolation entirely.
Another solution to the problem of tight coupling, is to use testing frameworks to interact with, or mock (simulate) platform dependencies. Frameworks such as Espresso and Robolectric give developers far more effective means for testing Units than the previous approach; the former being useful for tests run on a device (known as “instrumented tests” because apparently calling them device tests was not ambiguous enough) and the latter being capable of mocking the Android framework locally on a JVM.
Before I proceed to railing against such frameworks instead of the alternative I will discuss shortly, I want to be clear that I do not mean to imply that you should never use these options. The process which a developer uses to build and test their applications should be born of a combination of personal preference and an eye for efficiency.
For those who are not fond of building modular and loosely coupled applications, you will have no choice but to become familiar with these frameworks if you wish to have an adequate level of test coverage. Many wonderful applications have been built this way, and I am not infrequently accused of making my applications too modular and abstract. Whether you take my approach or decide to lean heavily on frameworks, I salute you for putting in the time and effort to test your applications.
Keep Your Frameworks At Arms Length
For the final preamble to the core lesson of this article, it is worth discussing why you might want to have an attitude of minimalism when it comes to using frameworks (and this applies to more than just testing frameworks). The subtitle above is a paraphrase from the magnanimous teacher of software best practices: Robert “Uncle Bob” C. Martin. Of the many gems he has given me since I first studied his works, this one took several years of direct experience to grasp.
Insofar As I understand what this statement is about, the cost of using frameworks is in the time investment required to learn and maintain them. Some of them change quite frequently and some of them do not change frequently enough. Functions become deprecated, frameworks cease to be maintained, and every 6-24 months a new framework arrives to supplant the last. Therefore, if you can find a solution which can be implemented as a platform or language feature (which tend to last much longer), it will tend to be more resistant to changes of the various types mentioned above.
On a more technical note, frameworks such as Espresso and to a lesser degree Robolectric, can never run as efficiently as simple JUnit tests, or even the framework free test from earlier on. While JUnit is indeed a framework, it is tightly coupled to the JVM, which tends to change at a much slower rate than the Android platform proper. Fewer frameworks almost invariably means code which is more efficient in terms of the time it takes to execute and write one or more tests.
From this, you can probably gather that we will now be discussing an approach which will leverage some techniques which allows us to keep the Android platform at arms length; all the while allowing us plenty of code coverage, test efficiency, and the opportunity to still use a framework here or there when the need arises.
The Art Of Architecture
To use a silly analogy, one might think of frameworks and platforms as being like overbearing colleagues who will take over your development process unless you set appropriate boundaries with them. The golden principles of software architecture can give you the general concepts and specific techniques necessary to both create and enforce these boundaries. As we will see in a moment, if you have ever wondered what the benefits of applying software architecture principles in your code truly are, some directly, and many indirectly make your code easier to test.
Separation Of Concerns
Separation Of Concerns is by my estimation the most universally applicable and useful concept in software architecture as a whole (without meaning to say that others should be neglected). Separation of concerns (SOC) can be applied, or completely ignored, across every perspective of software development I am aware of. To briefly summarize the concept, we will look at SOC when applied to classes, but be aware that SOC can be applied to functions through extensive usage of helper functions, and it can be extrapolated to entire modules of an application (“modules” used in the context of Android/Gradle).
If you have spent much time at all researching software architectural patterns for GUI applications, you will likely have come across at least one of: Model-View-Controller (MVC), Model-View-Presenter (MVP), or Model-View-ViewModel (MVVM). Having built applications in every style, I will say upfront that I do not consider any of them to be the single best option for all projects (or even features within a single project). Ironically, the pattern which the Android team presented some years ago as their recommended approach, MVVM, appears to be the least testable in absence of Android specific testing frameworks (assuming you wish to use the Android platform’s ViewModel classes, which I am admittedly a fan of).
In any case, the specifics of these patterns are less important than their generalities. All of these patterns are just different flavours of SOC which emphasize a fundamental separation of three kinds of code which I refer to as: Data, User Interface, Logic.
So, how exactly does separating Data, User Interface, and Logic help you to test your applications? The answer is that by pulling logic out of classes which must deal with platform/framework dependencies into classes which possess little or no platform/framework dependencies, testing becomes easy and framework minimal. To be clear, I am generally talking about classes which must render the user interface, store data in a SQL table, or connect to a remote server. To demonstrate how this works, let us look at a simplified three layer architecture of a hypothetical Android application.
The first class will manage our user interface. To keep things simple, I have used an Activity for this purpose, but I typically opt for Fragments instead as user interface classes. In either case, both classes present similar tight coupling to the Android platform:
public class CalculatorUserInterface extends Activity implements CalculatorContract.IUserInterface { private TextView display; private CalculatorContract.IControlLogic controlLogic; private final String INVALID_MESSAGE = "Invalid Expression."; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); controlLogic = new DependencyProvider().provideControlLogic(this); display = findViewById(R.id.textViewDisplay); Button evaluate = findViewById(R.id.buttonEvaluate); evaluate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { controlLogic.handleInput('='); } }); //..bindings for the rest of the calculator buttons } @Override public void updateDisplay(String displayText) { display.setText(displayText); } @Override public String getDisplay() { return display.getText().toString(); } @Override public void showError() { Toast.makeText(this, INVALID_MESSAGE, Toast.LENGTH_LONG).show(); } }
As you can see, the Activity has two jobs: First, since it is the entry point of a given feature of an Android application, it acts as a sort of container for the other components of the feature. In simple terms, a container can be thought of as a sort of root class which the other components are ultimately tethered to via references (or private member fields in this case). It also inflates, binds references, and adds listeners to the XML layout (the user interface).
Testing Control Logic
Rather than having the Activity possess a reference to a concrete class in the back end, we have it talk to an interface of type CalculatorContract.IControlLogic. We will discuss why this is an interface in the next section. For now, just understand that whatever is on the other side of that interface is supposed to be something like a Presenter or Controller. Since this class will be controlling interactions between the front-end Activity and the back-end Calculator, I have chosen to call it CalculatorControlLogic:
public class CalculatorControlLogic implements CalculatorContract.IControlLogic { private CalculatorContract.IUserInterface ui; private CalculatorContract.IComputationLogic comp; public CalculatorControlLogic(CalculatorContract.IUserInterface ui, CalculatorContract.IComputationLogic comp) { this.ui = ui; this.comp = comp; } @Override public void handleInput(char inputChar) { switch (inputChar){ case '=': evaluateExpression(); break; //...handle other input events } } private void evaluateExpression() { Optional result = comp.computeResult(ui.getDisplay()); if (result.isPresent()) ui.updateDisplay(result.get()); else ui.showError(); } }
There are many subtle things about the way in which this class is designed that make it easier to test. Firstly, all of its references are either from the Java standard library, or interfaces which are defined within the application. This means that testing this class without any frameworks is an absolute breeze, and it could be done locally on a JVM. Another small but useful tip is that all of the different interactions of this class can be called via a single generic handleInput(...) function. This provides a single entry point to test every behaviour of this class.
Also note that in the evaluateExpression() function, I am returning a class of type Optional<String> from the back end. Normally I would use what functional programmers call an Either Monad, or as I prefer to call it, a Result Wrapper. Whatever stupid name you use, it is an object which is capable of representing multiple different states through a single function call. Optional is a simpler construct which can represent either a null, or some value of the supplied generic type. In any case, since the back end might be given an invalid expression, we want to give the ControlLogicclass some means of determining the result of the backend operation; accounting for both success and failure. In this case, null will represent a failure.
Below is an example test class which has been written using JUnit, and a class which in testing jargon is called a Fake:
public class CalculatorControlLogicTest { @Test public void validExpressionTest() { CalculatorContract.IComputationLogic comp = new FakeComputationLogic(); CalculatorContract.IUserInterface ui = new FakeUserInterface(); CalculatorControlLogic controller = new CalculatorControlLogic(ui, comp); controller.handleInput('='); assertTrue(((FakeUserInterface) ui).displayUpdateCalled); assertTrue(((FakeUserInterface) ui).displayValueFinal.equals("10.0")); assertTrue(((FakeComputationLogic) comp).computeResultCalled); } @Test public void invalidExpressionTest() { CalculatorContract.IComputationLogic comp = new FakeComputationLogic(); ((FakeComputationLogic) comp).returnEmpty = true; CalculatorContract.IUserInterface ui = new FakeUserInterface(); ((FakeUserInterface) ui).displayValueInitial = "+7+7"; CalculatorControlLogic controller = new CalculatorControlLogic(ui, comp); controller.handleInput('='); assertTrue(((FakeUserInterface) ui).showErrorCalled); assertTrue(((FakeComputationLogic) comp).computeResultCalled); } private class FakeUserInterface implements CalculatorContract.IUserInterface{ boolean displayUpdateCalled = false; boolean showErrorCalled = false; String displayValueInitial = "5+5"; String displayValueFinal = ""; @Override public void updateDisplay(String displayText) { displayUpdateCalled = true; displayValueFinal = displayText; } @Override public String getDisplay() { return displayValueInitial; } @Override public void showError() { showErrorCalled = true; } } private class FakeComputationLogic implements CalculatorContract.IComputationLogic{ boolean computeResultCalled = false; boolean returnEmpty = false; @Override public Optional computeResult(String expression) { computeResultCalled = true; if (returnEmpty) return Optional.empty(); else return Optional.of("10.0"); } } }
As you can see, not only can this test suite be executed very rapidly, but it did not take very much time at all to write. In any case, we will now look at some more subtle things which made writing this test class very easy.
The Power Of Abstraction And Dependency Inversion
There are two other important concepts which have been applied to CalculatorControlLogic which have made it trivially easy to test. Firstly, if you have ever wondered what the benefits of using Interfaces and Abstract Classes (collectively referred to as abstractions) in Java are, the code above is a direct demonstration. Since the class to be tested references abstractions instead of concrete classes, we were able to create Fake test doubles for the user interface and back end from within our test class. As long as these test doubles implement the appropriate interfaces, CalculatorControlLogiccould not care less that they are not the real thing.
Secondly, CalculatorControlLogichas been given its dependencies via the constructor (yes, that is a form of Dependency Injection), instead of creating its own dependencies. Therefore, it does not need to be re-written when used in a production or testing environment, which is a bonus for efficiency.
Dependency Injection is a form of Inversion Of Control, which is a tricky concept to define in plain language. Whether you use Dependency Injection or a Service Locator Pattern, they both achieve what Martin Fowler (my favourite teacher on such topics) describes as “the principle of separating configuration from use.” This results in classes which are easier to test, and easier to build in isolation from one another.
Testing Computation Logic
Finally, we come to the ComputationLogic class, which is supposed to approximate an IO device such as an adapter to a remote server, or a local database. Since we need neither of those for a simple calculator, it will just be responsible for encapsulating the logic required to validate and evaluate the expressions we give it:
public class CalculatorComputationLogic implements CalculatorContract.IComputationLogic { private final char ADD = '+'; private final char SUBTRACT = '-'; private final char MULTIPLY = '*'; private final char DIVIDE = '/'; @Override public Optional computeResult(String expression) { if (hasOperator(expression)) return attemptEvaluation(expression); else return Optional.empty(); } private Optional attemptEvaluation(String expression) { String delimiter = getOperator(expression); Binomial b = buildBinomial(expression, delimiter); return evaluateBinomial(b); } private Optional evaluateBinomial(Binomial b) { String result; switch (b.getOperatorChar()) { case ADD: result = Double.toString(b.firstTerm + b.secondTerm); break; case SUBTRACT: result = Double.toString(b.firstTerm - b.secondTerm); break; case MULTIPLY: result = Double.toString(b.firstTerm * b.secondTerm); break; case DIVIDE: result = Double.toString(b.firstTerm / b.secondTerm); break; default: return Optional.empty(); } return Optional.of(result); } private Binomial buildBinomial(String expression, String delimiter) { String[] operands = expression.split(delimiter); return new Binomial( delimiter, Double.parseDouble(operands[0]), Double.parseDouble(operands[1]) ); } private String getOperator(String expression) { for (char c : expression.toCharArray()) { if (c == ADD || c == SUBTRACT || c == MULTIPLY || c == DIVIDE) return "\\" + c; } //default return "+"; } private boolean hasOperator(String expression) { for (char c : expression.toCharArray()) { if (c == ADD || c == SUBTRACT || c == MULTIPLY || c == DIVIDE) return true; } return false; } private class Binomial { String operator; double firstTerm; double secondTerm; Binomial(String operator, double firstTerm, double secondTerm) { this.operator = operator; this.firstTerm = firstTerm; this.secondTerm = secondTerm; } char getOperatorChar(){ return operator.charAt(operator.length() - 1); } } }
There is not too much to say about this class since typically there would be some tight coupling to a particular back-end library which would present similar problems as a class tightly coupled to Android. In a moment we will discuss what to do about such classes, but this one is so easy to test that we may as well have a try:
public class CalculatorComputationLogicTest { private CalculatorComputationLogic comp = new CalculatorComputationLogic(); @Test public void additionTest() { String EXPRESSION = "5+5"; String ANSWER = "10.0"; Optional result = comp.computeResult(EXPRESSION); assertTrue(result.isPresent()); assertEquals(result.get(), ANSWER); } @Test public void subtractTest() { String EXPRESSION = "5-5"; String ANSWER = "0.0"; Optional result = comp.computeResult(EXPRESSION); assertTrue(result.isPresent()); assertEquals(result.get(), ANSWER); } @Test public void multiplyTest() { String EXPRESSION = "5*5"; String ANSWER = "25.0"; Optional result = comp.computeResult(EXPRESSION); assertTrue(result.isPresent()); assertEquals(result.get(), ANSWER); } @Test public void divideTest() { String EXPRESSION = "5/5"; String ANSWER = "1.0"; Optional result = comp.computeResult(EXPRESSION); assertTrue(result.isPresent()); assertEquals(result.get(), ANSWER); } @Test public void invalidTest() { String EXPRESSION = "Potato"; Optional result = comp.computeResult(EXPRESSION); assertTrue(!result.isPresent()); } }
The easiest classes to test, are those which are simply given some value or object, and are expected to return a result without the necessity of calling some external dependencies. In any case, there comes a point where no matter how much software architecture wizardry you apply, you will still need to worry about classes which cannot be decoupled from platforms and frameworks. Fortunately, there is still a way we can employ software architecture to: At worst make these classes easier to test, and at best, so trivially simple that testing can be done at a glance.
Humble Objects And Passive Views
The above two names refer to a pattern in which an object that must talk to low-level dependencies, is simplified so much that it arguably does not need to be tested. I was first introduced to this pattern via Martin Fowler’s blog on variations of Model-View-Presenter. Later on, through Robert C. Martin’s works, I was introduced to the idea of treating certain classes as Humble Objects, which implies that this pattern does not need to be limited to user interface classes (although I do not mean to say that Fowler ever implied such a limitation).
Whatever you choose to call this pattern, it is delightfully simple to understand, and in some sense I believe it is actually just the result of rigorously applying SOC to your classes. While this pattern applies also to back end classes, we will use our user interface class to demonstrate this principle in action. The separation is very simple: Classes which interact with platform and framework dependencies, do not think for themselves (hence the monikers Humble and Passive). When an event occurs, the only thing they do is forward the details of this event to whatever logic class happens to be listening:
//from CalculatorActivity's onCreate() function: evaluate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { controlLogic.handleInput('='); } });
The logic class, which should be trivially easy to test, is then responsible for controlling the user interface in a very fine-grained manner. Rather than calling a single generic updateUserInterface(...) function on the user interface class and leaving it to do the work of a bulk update, the user interface (or other such class) will possess small and specific functions which should be easy to name and implement:
//Interface functions of CalculatorActivity: @Override public void updateDisplay(String displayText) { display.setText(displayText); } @Override public String getDisplay() { return display.getText().toString(); } @Override public void showError() { Toast.makeText(this, INVALID_MESSAGE, Toast.LENGTH_LONG).show(); } //…
In principal, these two examples ought to give you enough to understand how to go about implementing this pattern. The object which possesses the logic is loosely coupled, and the object which is tightly coupled to pesky dependencies becomes almost devoid of logic.
Now, at the start of this subsection, I made the statement that these classes become arguably unnecessary to test, and it is important we look at both sides of this argument. In an absolute sense, it is impossible to achieve 100% test coverage by employing this pattern, unless you still write tests for such humble/passive classes. It is also worth noting that my decision to use a Calculator as an example App, means that I cannot escape having a gigantic mass of findViewById(...) calls present in the Activity. Giant masses of repetitive code are a common cause of typing errors, and in the absence of some Android UI testing frameworks, my only recourse for testing would be via deploying the feature to a device and manually testing each interaction. Ouch.
It is at this point that I will humbly say that I do not know if 100% code coverage is absolutely necessary. I do not know many developers who strive for absolute test coverage in production code, and I have never done so myself. One day I might, but I will reserve my opinions on this matter until I have the reference experiences to back them up. In any case, I would argue that applying this pattern will still ultimately make it simpler and easier to test tightly coupled classes; if for no reason other than they become simpler to write.
Another objection to this approach, was raised by a fellow programmer when I described this approach in another context. The objection was that the logic class (whether it be a Controller, Presenter, or even a ViewModel depending on how you use it), becomes a God class.
While I do not agree with that sentiment, I do agree that the end result of applying this pattern is that your Logic classes become larger than if you left more decisions up to your user interface class.
This has never been an issue for me as I treat each feature of my applications as self-contained components, as opposed to having one giant controller for managing multiple user interface screens. In any case, I think this argument holds reasonably true if you fail to apply SOC to your front end or back end components. Therefore, my advice is to apply SOC to your front end and back end components quite rigorously.
Further Considerations
After all of this discussion on applying the principles of software architecture to reduce the necessity of using a wide-array of testing frameworks, improve the testability of classes in general, and a pattern which allows classes to be tested indirectly (at least to some degree), I am not actually here to tell you to stop using your preferred frameworks.
For those curious, I often use a library to generate mock classes for my Unit tests (for Java I prefer Mockito, but these days I mostly write Kotlin and prefer Mockk in that language), and JUnit is a framework which I use quite invariably. Since all of these options are coupled to languages as opposed to the Android platform, I can use them quite interchangeably across mobile and web application development. From time to time (if project requirements demand it), I will even use tools like Robolectric, MockWebServer, and in my five years of studying Android, I did begrudgingly use Espresso once.
My hope is that in reading this article, anyone who has experienced a similar degree of aversion to testing due to paralysis by jargon analysis, will come to see that getting started with testing really can be simple and framework minimal.
Further Reading on SmashingMag:
Sliding In And Out Of Vue.js
Designing And Building A Progressive Web Application Without A Framework
CSS Frameworks Or CSS Grid: What Should I Use For My Project?
Using Google’s Flutter For Truly Cross-Platform Mobile Development
Tumblr media
(dm, il)
0 notes
Link
Web Components are a newly supported standard. They're a great match for Design Systems because they're futureproof and work with any framework. Building proper UI Web Components can be quite a task though, especially if you want them to be accessible. Here are some pointers on what to look out for.
Originally posted on erikKroes.nl. Questions are also welcome on Twitter or Twitch (I stream about accessibility weekly).
Throughout this article I'll use Lion a few times as an example. Lion is a collection of white label UI Web Components. There's more information about Lion in the conclusion.
Contents
What are Web Components?
What is shadow DOM, and light DOM?
Extending elements
Accessible UI Components
Focusable
Keyboard interaction
Visible states
Functional states and properties
Semantics
Accessible name
Relationships
Global standards and conventions
Browser bugs and variations
The Accessibility Object Model
Conclusion
Further reading
What are Web Components?
Web Components are a set of standards:
Custom Elements: A way to create your own HTML elements
ES Modules: Self-contained modules of JavaScript code that can be reused and extended
HTML Templates: Reusable fragments of DOM
Shadow DOM: Encapsulation of DOM
Together these standards enable "Reusable extendable encapsulated self-contained components for the web". That's quite a mouthful, but not very clear.
In practice, this means you can create your own HTML elements. These elements have their own bit of encapsulated DOM. In this, and many web-related cases, DOM stands for Document Object Model. The DOM is how we see an HTML or XML document. MDN states "The DOM represents the document as nodes and objects." MDN has a rather good explanation. It means the HTML element you make can't be touched or influenced by whatever is outside of the element. They can't be accidentally styled, and they won't mess with your global styles either. And because it's an ES Module, the whole element can be distributed and extended. All these aspects together make up a Web Component.  ES Module stands for EcmaScript Module. It's how JavaScript works with modules and a standard that's supported by all modern browsers. 🎉
A practical example would be a Google Maps Web Component. This Web Component shows a full interactive map on your page with only a few lines of code. You would have to import some JavaScript on your page that defines the component:
<script src="good-map.js" async defer></script>
After that, you can use your custom element anywhere on the page.
<good-map api-key="AIzaSyAQuo91bcoB-KwWXaANroTrzpNZRFcNJ1k" latitude="52.1664" longitude="5.9075" zoom="3"></good-map>
Notice how the element name has a dash? That's part of the Custom Elements specification and makes it easier for the browser to recognize them.
A not so practical example would be a spacer-gif Web Component. (A spacer-gif is an old an redundant technique that does not need a remake.)
<spacer-gif height="1" width="1"></spacer-gif>
A Lion example could be lion-switch.
<lion-switch label="Label Text" help-text="Help text"></lion-switch>
And all that goodness is based on widely supported web standards.
What is shadow DOM, and light DOM?
"Indeed, that sounds pretty good so far, but what's the catch?"
As the British will soon discover, there are some downsides to isolating yourself. Let's say you make a card component. The interface for using it (what you see in your editor or browser) could look like this:
<my-card>This is the card content</my-card>
The component, when inspected in the browser, could look like this:
<my-card> #shadow-root (open) <div class="card-wrapper"> <div class="card-header"> Presenting the card content: </div> <div class="card-content"> <slot> <#text>↴ </slot> </div> </div> This is the card content </my-card>
A whole chunk of DOM ("The DOM represents the document as nodes and objects." Remember from before?) is rendered by the component and put into the shadow-root section. Inside the <slot> it refers to the content we put into the element in the first place. All the DOM that is added, is shadow DOM. All the other "normal" DOM, is what we call light DOM. It's the part that's always visible. As the shadow DOM is completely encapsulated and isolated, it is also completely disconnected. It's almost like it's a completely different document like an iframe. Thankfully, keyboard navigation does work through Shadow DOM boundaries. Which means you can <TAB> in and out of Shadow DOM.
This becomes a challenge when you want to point a label to an input to create an explicit relationship. In plain HTML, this would be:
<label for="example-input">Label text</label> <input id="example-input" type="text">
When one of both (the label or the input) is in the shadow DOM, they're in a completely different context. This makes it impossible to refer to eachother. This same dillema also goes for WAI-ARIA attributes like aria-labelledby, aria-describedby and other that reference an ID. You need either both elements in the shadow DOM, or both of them in the light DOM. Light DOM does not mean that they both have to be in the same slot though. Light DOM is basically all the DOM that isn't shadow DOM.
In the lion-input we let the developer declare a label in the label slot. This label ends up in the light DOM.
<lion-input> <label slot="label">Label text</label> </lion-input>
The component places an input in a slot="input", help text in slot="help-text"and feedback in slot="feedback". This means the input can be connected to the label, but also that we can use aria-describedby to connect the input to help text like instructions and feedback like error messages.
Extending elements
As it stands right now, it is only possible to create a Web Component by extending a generic HTML element (HTMLElement) or another Web Component (which should be somewhere deep down, also an extension of HTMLElement).
For accessibility, it could have been a big win if we could extend any element. Imagine you could, for example, extend a native button (HTMLButtonElement). You would inherit all its behaviour and it's semantics, and you would only add on to that. You'd have a solid fundament upon which you could build.
Tumblr media
The specification exists but Safari has stated to not support this feature. Part of the beauty of Web Components is that it's a supported standard. So even though there is a Polyfill for Safari, it creates a path with future uncertainty.
Accessible UI Components
The most popular usecase for Web Components is probably that of creating custom user interface controls. As we can't extend any native elements, we often end up with either wrapping a native element, or recreating its behaviour by ourselves. Wrapping is often the easiest and most solid solution. Recreating is basically the same as taking a <div> as a starting point. There are so many aspects that come together in a single components, that it is really easy to overlook a feature or behaviour. And when you forget or fail to implement something, you end up creating something that's lacking compared to a native element. That's probably the exact opposite of what you're trying to achieve.
Here is an overview of aspects that need special attention when creating an accessible user interface control. These points are not specific to Web Components. They are just as relevent for React, Vue, Svelte or any other framework.
Focusable
If your custom control is interactive, make sure it is keyboard focusable. For simple controls with a single interactive element, this means adding tabindex='0' to your control. For more complex controls you might need to implement a roving tabindex or use aria-activedescendant.
Keyboard interaction
Users should be able to use your interactive control with a keyboard. For many design patterns, suggested keyboard interactions can be found in the WAI ARIA Authoring Practices.
Visible states
Interactive controls have several states like focus, hover and active. These should all be clearly visible, and, preferably, each have their own distinctive styling.
Functional states and properties
An interactive control can have functional states as well. For example, a disclosure widget (or expandable, accordion, expando, ...) can be open or closed. This state needs to be not just visual, but communicated in code as well. This can be done by toggling aria-expanded on your control.  The same goes for properties like aria-multiline. They communicate properties that might be implicit in native elements, that have to be added manually for assistive technology when you're building custom controls. WAI-ARIA has many states and properties to aid in this.
Semantics
Native HTML elements have a semantic meaning and are mapped to WAI-ARIA roles. Their semantics are implicit and always there. A custom element starts out with no role at all, but you can assign one explicitly. WAI-ARIA offers a wide range of roles that should cover all use cases. WAI ARIA is more explicit than native semantics though. It's more bolt-on than built-in. You might notice when using Windows High Contrast Mode, a special tool for Windows. It does not care for your ARIA attributes.
Accessible name
Interactive controls must have a name for them to be identified by. For example, a <button> with the text "Save" can be presented by assistive technology as "Save, button". In this case "Save" is the accessible name of the element. The name is determined by the Accessible Name and Description Calculation and there are multiple ways of adding an accessible name.
Relationships
Visually, it might be clear that certain elements have a relationship. For example, a short text next to an input will likely be the label of that input. Not clarifying those relationships in code can make it impossible for assistive technology to recognize them though. WCAG Success Criterion 1.3.1 mentions quite some sufficient techniques to cover this issue.
Global standards and conventions
Creating custom elements requires awareness of global standards and conventions. Users expect components to work in a certain way. Reinventing the wheel often leads to a confusing user experience. Following standards and conventions will prevent confusion and create a consistent experience for users.
Browser bugs and variations
To create an element that works the same way on each browser and platform is a big challenge. Some native elements even fail to do so. For example, when I use a <select> in Firefox on Mac OS, it will behave differently from when I open it in Chrome. There will even be a difference between Chrome on Mac OS and Chrome on Windows. The nuances and details of making elements work consistently across platforms is a really big challenge. Bugs can be even harder to find or circumvent. For example, the WAI ARIA Authoring Practices 1.1 recommends using aria-activedescendant to control focus when using a role="combobox". That sounds great, untill you discover that this combination doesn't actually work in all browsers.
The Accessibility Object Model
The Accessibility Object Model (AOM) is a proposed addition to the web platform to make the accessibility API of browsers more transparant and usable for developers. Support for the AOM in browsers would be of great value for Web Components. But as it is still under development and largely unsupported, I'll leave further explanation to others like Hidde de Vries.
Tumblr media
Conclusion
It is very much possible to create accessible Web Components. They are ideal for large organizations where a specialized team can make the best building blocks, and give both their developers and users a great consistent experience. It takes a lot of time, knowledge and effort to build these components though. If you'd ask me...
Everybody should use Web Components Few people should build them
To ease some of that pain, the Web Components I work on professionaly have an open source base layer called Lion. This is a collection of white-label Web Components that you can easily extend, style and customize. They have been built with all the considerations mentioned above. You can view a live demo of all the components, or check them out on GitHub. If you find anything that could be improved, please create an issue and maybe even fix it yourself. All accessibility issues are my responsibility
0 notes
bluejanuarysky · 6 years
Text
7 Common Misconceptions About SEO 2019
Understand about algorithm changes, Google improvements and changing customer behaviour in order to plan your SEO marketing regarding 2019. Here's the truly amazing news: You don't have in order to have to be a SEARCH ENGINE OPTIMIZATION wizard to make sure your own website is well positioned regarding organic search engine traffic. SEARCH ENGINE OPTIMIZATION is the acronym for research engine optimisation. The particular search engines have refined their own algorithms along with this progression, numerous tactics that worked within 2004 can hurt your SEARCH ENGINE OPTIMIZATION today. Therefore, we also generate content on conducting keyword analysis, optimizing images for search motors, creating an SEO strategy (which you're reading right now), plus other subtopics within SEO. In 2018 there will be an also bigger focus on machine understanding and SEO from data. ” Of course, the amplification part of things will continue in order to incorporate increasingly with genuine public relationships exercises rather than shallow-relationship hyperlink building, which will become significantly easy to detect by lookup engines like google. Seo (SEO) is often regarding making small modifications to components of your website. In my SEO content writing guidelines I suggest a person take your main keyword plus 3 or 4 other associated keywords and write at 3-4%. Some SEO specialists claim that will building links for SEO reasons is pointless; others believe the particular role of backlinks for the internet site has continually risen through this years. Search engine optimization (SEO) is a huge part associated with any marketing strategy. This fresh paradigm of users relying upon voice search for many associated with their search needs will end up being a game changer for SEARCH ENGINE OPTIMIZATION. Register and raise the free donation for SEO Greater london every time you shop on the web. Local SEO - Optimize that localized content on your internet site to properly leverage local indicators, online reviews and business goods. Learn more about content material optimization for SEO here. Along with paid-search it offers a very focused audience, visitors referred by SEARCH ENGINE OPTIMIZATION will only visit your web site if they are seeking particular home elevators your products or even related content. From keyword ingrdient filling to link buying, the SEARCH ENGINE OPTIMISATION landscape has seen numerous black-hat tricks — and Google usually catches on. Chris Gregory, founder plus managing partner at Jacksonville dependent firm, DAGMAR Marketing, predicts that will AI and machine learning might have a big impact upon SEO in 2019 and SEOs who aren't technical will become left in the dust. Some SEO professionals also advise that anchor textual content should be varied as numerous pages linking to one web page using the same anchor textual content may look suspicious to find motors. SEO trickery such because keyword ‘stuffing' in irrelevant articles simply won't cut it within the current day, with Google's algorithm taking over 200 aspects to ensure that it's ranks provide results with valid plus authoritative sites, it is next to on impossible to complete anything some other than work with the look for engines to make sure best quality SEO results. From a SEARCH ENGINE OPTIMIZATION perspective, the principal keyword need to be at the beginning adopted by the other relevant key phrases. To possess a better SEARCH ENGINE OPTIMIZATION, helps your website can obtain on the top among well-known search engines like Bing plus Google. On the various other side, you can ensure a good effective content marketing campaign just when you apply the SEARCH ENGINE OPTIMIZATION techniques properly. SEO : Search engine optimization: the procedure of making your internet site better regarding search engines. The purpose of SEARCH ENGINE OPTIMIZATION writing is to make your own company more visual, more attractive in website search engines. SEO is usually the practice of increasing the particular quantity and quality of targeted traffic to your website through natural and organic search engine results. 31. SEO data can notify a smart social media technique. Solid keyword & marketplace research assist SEO strategy plus allow us to deliver realistic projections and forecasts of opportunity inside your market. Nevertheless, when this comes to developing and carrying out an audio SEO strategy intended for your business, just creating content material for the keywords your clients are looking for is each arduous and, well, wrong. In this situation, in, the article ranks correct after the official Google suggestions (and it makes sense that will Google should be number one on their own branded query) but Smashing magazine is proven as a position 0” little of text on the question Google pop up guidelines” within. Search Engine Land, a top quality SEO blog this is the pillar of the community is usually ranking after Smashing (which occurs to be associated with a style blog than an SEO one). This particular means that SEOs spend the lot of time working upon getting links in a procedure called link building Link-building techniques can range from simply asking for a link to writing the guest post - and presently there are many others. Basically, SEO plans the keywords that will are to be delivered plus content provides them. So, when you are considering about applying SEO in the particular broad sense, you need in order to channelize its technical specifications via content marketing. In 2019, you can wager that White Hat SEO will certainly have separated itself even more from Black Hat SEO, plus that above all else, delivering quality content will be the particular most important factor for companies ranking in search. The outcomes are not instant, you can use the time on attempting other Internet marketing techniques whilst SEO would go to function. The third major SEARCH ENGINE OPTIMIZATION ranking signal is Google's synthetic intelligence search ranking algorithm. Sometimes SEO will be simply a matter of producing sure your site is organised in a way that lookup engines like google understand. SEARCH ENGINE OPTIMIZATION involves a number of modifications towards the HTML of person Web pages to attain a higher search engine ranking. As a result associated with technological advancement, SEO is in order to undergo more drastic changes, plus the two latest technologies that will are expected to influence SEARCH ENGINE OPTIMIZATION to some very great degree are AI (Artificial Intelligence) plus Voice Search. 55 The difference from SEO is many simply depicted as the distinction between paid and unpaid concern ranking searching results. I get into much more detail in SEO Titles on pages: 15-Point Checklist for B2B and B2C Brands, which explains how one can work in relevant keywords that will accurately reflect the page articles. Are good nevertheless SEO potential may be reduced in comparison to single links. The education and learning behind our SEO expertise has been developed from years and many years of learning from mistakes marketing and advertising with our other businesses. The in-depth guide contains the most recent SEO best practices so a person can improve how your content appears in search results, plus get more traffic, leads, plus sales. Keyword analysis definitely belongs to the SEARCH ENGINE OPTIMIZATION basics. I'll start by stating that social mass media and SEO are heavily linked to each other. Black head wear SEO attempts to improve ratings in ways that are disapproved of by search engines, or even involve deception. This particular is more tedious and tasking than inorganic SEO because this particular is how all the key phrases get a full blast associated with attention. SEO: It stands for Research Engine Optimization. Within this post, we'll break this down in the complete first timers guide to SEO: what SEARCH ENGINE OPTIMIZATION is, how it works, exactly what factors affect search and exactly what sorts of changes you may make today to improve your own search optimization. The no follow hyperlink has been contradicted many instances over where SEO is included and it depends on the particular web owner regarding if these people allow them on the web site or not. The Technical Audit Checklist Produced For Human Beings — Within this post by Distilled, a person will find a link in order to a Google sheet that provides an technical SEO audit guidelines and links to resources upon how to complete each checkbox. Then each time the term SEO appears on your web site, it's automatically changed into the link you specified. Keyword Analysis for SEO: The Definitive Manual — This comprehensive guide simply by Brian Dean teaches you the number of strategies for obtaining keywords and determining intent intended for your target market. On-page and off-page SEO function together to improve your research engine rankings in complementary style; however, SEOs generally advise obtaining your on-page SEO ducks within a row before focusing as well much on off-page SEO. Within 2019, web-based businesses will follow 5 Great Lessons You Can Learn From SEO 2019 more voice-to-text technology to enhance engagement and search activity. There are many SEO sites suggesting that they can offer a service to make our own website LSI friendly, or fulfill ‘LSI requirements'. The particular art of web SEO is situated in focusing on how individuals search for things and knowing what type of results Search engines wants to (or will) screen to its users. Social press SEO would encourage your present customers to come back whilst helping you develop authority regarding potential ones. He is an expert in SEO, Content Marketing, plus Pinterest Marketing. An SEARCH ENGINE OPTIMIZATION expert plays a huge part in helping companies build their own businesses and attract new clients through website traffic. An SEO on the internet marketing strategy is a extensive plan to get more individuals to your website through research engines. A few search optimizers try to tip Google by using aggressive methods that go beyond the fundamental SEO techniques. Subscribe to the particular Single Grain blog now regarding the latest content on SEARCH ENGINE OPTIMIZATION, PPC, paid social, and the particular future of internet marketing. SEO can furthermore stand for search engine optimizer. Like the rest of the particular digital landscape, SEO marketing is usually continuously evolving. Search Engine Book — Read information right after Moz's guide to solidify knowing regarding it of the basic elements of SEO. If a person do not have the period or have insufficient training upon web design or SEO, Appear for web design experts plus hire a professional SEO services agency to keep your internet site and your good reputation in any other case you business may depend upon it. I ended with the website number 1, 228, 570, 060. This particular generates SEO anchor text, which usually helps you in improving your own search engine rankings. SEARCH ENGINE OPTIMIZATION marketing is focused on the keyword choice that will attract a excellent deal of unique visitors in order to your website. Maybe you have ponder what will be the fresh changes and updates that all of us can experience in SEO inbound links sphere in 2019? A Cisco research found that by 2019, eighty percent of all consumer Web traffic will be from Web video traffic. If you might have spent time online recently, you have probably look at the term "SEO, inch or "Search Engine Optimization. By merging a new way to work along with SEO and prioritized lists associated with recommendations—not to mention competitor evaluation and keyword monitoring—Siteimprove SEO is definitely your all-in-one tool to develop traffic, prove ROI, and effortlessly create content. All the SEO styles listed here may have started in late 2017 or earlier 2018, but their true advantage could be reaped in 2019. Google's David Mueller said on Twitter, along with the disclaimer of him placing his user hat on (ofcourse not Google hat), that relabeling older content as new, with simply no additional changes is a poor SEO hack. All of us associated with creatives, designers & developers function alongside our SEO & articles teams to ideate, research, style & create remarkable infographics and interactive content for brands that will get shared across the internet. Contemporary SEO strategy may be the process associated with organizing a website's content simply by topic, which helps search engines like yahoo realize a user's intent when looking. Page loading time is dependent upon Page Load speed, Web page loading time is one associated with the important factors in Cell phone SEO 2017. Public Media as a platform can not be ignored in any SEARCH ENGINE OPTIMIZATION plan. Seo stands with regard to search engine optimization, when a person are searching for an SEARCH ENGINE OPTIMIZATION or Search Engine Optimization Organization then you needs to appear for various factors which may have a favorable and undesirable affect on your business. Keyword studies about obtaining those terms so that a person can use them properly within content optimization and SEO within general. Just as content by yourself isn't enough to guarantee SEARCH ENGINE OPTIMIZATION success, SEO alone isn't good enough to ensure that people can find and engage with your own articles. While intense SEO may involve complex site restructuring along with a firm (or consultant) that will specializes in this area, generally there are a few simple methods you can take yourself in order to raise your search engine ranking. While we prepare to enter 2019, keyword creation for SEO professionnals will become less important. Obtain the training you need in order to stay ahead with expert-led classes on Seo (SEO). Learn how to create articles, learn how to compose some simple HTML, and the particular learn the very basic concepts of SEO, and you may make money online using SEARCH ENGINE OPTIMIZATION and article marketing to obtain your web site (you only require one from each website) shown on Page #1 of Search engines (forget Yahoo as well since the rest) and you will certainly get loads of visitors that will web page. If your website will be made up of lower-quality threshold type pages using old SEO-techniques (which more and more branded as spam in 2018) after that Google will not index almost all of the pages as properly as your website ‘quality score' is probably likely to become negatively impacted. This particular is beyond website content, but great user experience has become a lot more and more important in solid SEO rankings. There is usually no magic wand in your own hands to regulate or manage your competitors' strategies or administration, Google analytics update, or user's behavior communicate business but a person can manage your SEO. In this particular new environment, the digital internet marketer who views SEO in the broader context will surely come out there ahead of the competition within 2018 and beyond. Good SEO publications explain in detail how greatest to use keywords and just how to structure your entire web site to attract the attention associated with search engine spiders and associated with human visitors, and a posting such as this cannot perform the topic justice. While businesses start on an SEO advertising strategy, they should realize that a good entire marketing campaign can drop flat on its face in case a business is unable in order to reach the masses, that is definitely, their target audience. If your own pages were designed to obtain the most out of Search engines, with commonly known and today outdated SEO techniques chances are usually Google has identified this plus is throttling your rankings within some way. Several business people find keeping upward with the "moving target" associated with SEO distracts them from day-to-day priorities more than they actually imagined, so it's good in order to appear closely at what can make sense for every business. The app process for the SocialSEO Electronic Marketing and SEO Scholarship is definitely done 100% electronically and demands these list of materials. Still, even for the particular best websites, maintaining a best organic SEO ranking requires constant keyword monitoring and content re-doing. Writer and consultant Peter Kent provides helped businesses including Amazon plus Zillow with SEO and on-line marketing. Very first, understand that schema markup will be one of the most effective, least used parts of SEARCH ENGINE OPTIMIZATION today Schema are basically short snippets of data that may give extra information to look customers and search engines. SEO is definitely a marketing discipline focused upon growing visibility in organic (non-paid) search engine results. Simply no matter how many times Search engines tweaks or evolves The Protocol, from Panda to Penguin in order to Polar Bear, these logical plus intuitive core SEO tips need to remain timeless. Certainly, all those searching for SEARCH ENGINE OPTIMIZATION agencies will have to create their selection by passing SEARCH ENGINE OPTIMIZATION companies through careful and careful scrutiny, to ensure that all of them to get the best within search engine optimization for their own business website. The article provides you 12 tricks for E-commerce plus establishing an SEO optimized web site which will help you raise your business exposure and visibility upon search engines. Making use of keywords in your article name, article body and resource is definitely a great SEO article composing strategy that may make your own articles more effective in getting attention from search engines. Use SEO strategies like as transcripts and tags in order to help your videos appear increased in search results and appeal to more viewers over time. The sensible strategy for SEO might still appear to be in order to reduce Googlebot crawl expectations plus consolidate ranking equity & possible in high-quality canonical pages plus you do that by reducing duplicate or near-duplicate content. This can take a LONG period for a site to recuperate from using black hat SEARCH ENGINE OPTIMIZATION tactics and fixing the difficulties is not going to necessarily bring organic visitors back as it was just before a penalty. The particular best SEO Guide is right here to dispel those myths, plus give you all you require to know about SEO in order to show up online and various other search engines, and ultimately make use of SEO to grow your company. > > Upon Page Optimization: On-page SEO is usually the act of optimizing single pages with a specific finish goal to rank higher plus acquire more important movement within web crawlers. There are several websites providing pertinent information regarding SEO and online marketing, and you may learn from them. But it's confusing why some businesses don't try out harder with analysis, revisions, plus new content with their SEARCH ENGINE OPTIMIZATION online marketing strategy. An effective SEO strategy will certainly be made up of a mix of elements that ensure your web site is trusted by both consumers as well as the research engines. By taking their own marketing needs online and employing confer with an experienced SEARCH ENGINE OPTIMIZATION agency, a business has the capacity to achieve thousands, or even millions associated with people that they would have got not been able to in any other case. Therefore, cheer up and tools up to arrange for SEO- the particular organic top-ranking practice. SEARCH ENGINE OPTIMIZATION (search engine optimization) places your own website within the natural outcomes section of search engines. SEO is specifically important for businesses because it guarantees they're answering their audience's greatest questions on search engines, whilst driving traffic to their items and services. Intended for marketers who were brought upward in the ‘traditional SEO marketplace, ' 2018 is really the time to adapt or pass away. White hat SEO includes most the SEO practices we've discussed about so far which possess a long term approach in order to site optimization and focus upon the user experience and exactly what people need. Cost effectiveness - SEO is definitely one of the most cost effective marketing strategies because it focuses on users who are actively searching for your products and providers online. The reality is that you can obtain top Search engine ranking opportunities spending a little bit associated with money and working on the particular project yourself or paying the professional Seo services thousands associated with dollars to get your Internet site on the first page. Although black hat SEARCH ENGINE OPTIMIZATION methods may boost a home page's search engine page rank within the short term, these strategies could also get the web site banned from the search motors altogether. According in order to research and advisory firm Forrester, programmatic marketing is expected in order to account for 50% of almost all advertising by 2019. An extensive dental marketing plus dental SEO campaign can become attained by the enterprise just if the web address associated with a dental practice contains directly into all the promotional materials with regard to the business. This shows the importance of focussing voice search engine results within order to grow your company, marketing, and Search Engine Optimization(SEO) strategies. They attain this by increasing their internet site rank through a method known as SEO or even search engine optimization. Just like almost all other SEO approaches, be certain your links are appropriate, plus be careful to not cross the particular line into excessive linking -- you don't want your guests to obtain annoyed. Bryan Yeager, Research Director at Gartner, will certainly share 9 Key Insights through Gartner's Marketing Technology Survey in order to Help You Prepare for 2019 and Beyond. SEO is a combination associated with digital marketing efforts all functioning together to increase a website's value to users and presence in search. On-page SEO (also identified as "on-site" SEO) could be the work of optimizing different parts associated with your site that affect your own search engine rankings. In 2019, we'll have to optimize voice lookup answers with CTAs that Google's algorithms don't pick up upon, but humans do. Dan Mallette, Lead SEO Strategist at each InVue Digital & HearstDMS, forecasts that SEOs will need in order to optimize for voice search and locate new avenues as SERP real-estate shrinks. Obviously, a social networking webpage that has more interaction will probably bring bigger SEO benefits in order to some business than one that will has less interaction, but basically having a social presence is definitely a good start. Ranking elements can be divided into on-page SEO factors (including technical SEO) and link building or off-page SEO factors. Take the 10 pillar subjects you came up with within Step one and create the web page for each a single which outlines the topic with a high level - making use of the long-tail keywords you arrived plan for each cluster within Step 2. A pillar web page on SEO, for instance, may describe SEO in brief areas that introduce keyword research, picture optimization, SEO strategy, and additional subtopics as they are discovered. On our blog all of us chronicle current trends in on the web marketing and SEO and current interesting studies, statistics and tendencies. Increased site usability - Within an effort to make your own site easier to navigate with regard to the search engines, SEO at the same time helps to make your site more navigable for users simply because well. You are capable to host your video upon YouTube for your Blog9T foundational SEO greatest practices, but link and focus on the embedded video on your own own website. Image SEO is actually a crucial part of SEARCH ENGINE OPTIMIZATION different types of websites. Max DesMarais is definitely an SEO as well as PPC Specialist for Vital, a new Digital Marketing & PPC firm that specializes in PPC managing services. But this also has an incredible roundabout benefit to your bottom range: boosting your search engine search engine optimization (SEO). It may be the circumstance (and I surmise this) that this introduction of a certain SEARCH ENGINE OPTIMIZATION technique initially artificially raised your own rankings for the pages within a way that Google's methods never approve of, and as soon as that is actually spread out all through your site, traffic starts in order to deteriorate or is slammed within a future algorithm update.
0 notes
sharifs · 7 years
Text
Sparky The Sheriff (Previously "Sharif's Twitface") Not Only On Twitter
Although I don’t talk about it much, I do take action on other social media besides Twitter (@HonourableHappy)  as well.
You may have heard me mention that I have a very above average LinkedIn (Sharif Sourour On LinkedIn) account as well with over 4500 connections, but besides this I do more social media as well.
Right now I have 3 Facebook Fan Pages, one is for the Algonquin Japanese Language & Culture Club I created at the school, but do not do anything beyond an infrequent post on Japan or its culture.
The other two are company pages. One is a Riff Share Media’s fan page I made years ago but haven’t grown it until recently and the other is Production Hackers’ fan page. I mostly am active on those two, using Riff to share selected Production Hackers media to separate audiences.
They both have small audiences of about 50-something members each but they have been grown through advertising which I have experimented with and can keep growing them that way.
I am also on a fairly new platform called Minds.com (@SharifS) where I have about 1.3k subscribers, which is extremely good on that platform, since it is not nearly as big as Twitter.
Twitter has an estimated user base of 300 million active users, while Minds is over 1 million active users so over 1000 subscribers on Minds is very high.
Also on Empire.Kred which is an online social media stock market simulation that connects with your social media accounts where you are given some starter currency called “Eaves” which allows you to purchase shares from other social media influencers I am doing quite well.
As a pretty strong influencer online within Top 90 Twitter accounts in Canada, my shares keep getting bought up! I now have about 69 million Eaves to spend on others’ shares, or even to spend on advertising services provided by the platform.
In terms of the Minds platform there is also a payback system which has you earn points for activity and engagement. Currently I have built up about 45,000 points which can also be used for advertising on the platform.
The cool thing about Minds is it is like a new Facebook, much better, snappier interface, less unnecessary features, more ways to earn from having an account, high connectivity, while it currently is only 1 million users and growing it has only been around two years.
I predict that within 5 years, it will be huge especially if Facebook and Twitter keep moving in the censorship-for-the-establishment direction.
Minds is all about free speech but has features like hiding explicit content before asking if you are old enough to view. It has its own economy with its points system, a built-in blog feature that is a full-fledged system developed from the ground up in a much more efficient way than platforms like Facebook.
From time to time I also use Klout, which, like Empire.Kred connects to other social media’s data to evaluate influence. It uses a rating between 0 and 100, with 100 being the most famous/influential person (Obama, Trump, Bieber, Kardashian, Perry, etc… are all 90+) and 0 being someone who has no influence.
The average influencer scores a 40 while anyone 63+ is considered a major influencer. My rate has been floating back and forth between 66 and 68 for the last year or so, so it makes sense when people have reached out to interview me.
Besides this I am on the blogging platform Medium.com (@HonourableHappy) with about 1.8k people following me on there while I am also on Tumblr (sharifs) which I just started building up as well.
Moreover I am on yet another platform for businesses called Alignable where I’ve built up 161 business focused connections (Similar to LinkedIn).
I currently have an email list of about 10,000 people and have experimented with successful list-building as well.
A great part is the groups features on some of these platforms like Facebook, Minds and LinkedIn, as participating there is great for building up a relationship among connections. In any case, in terms of social media, my current largest value may be in Twitter with my biggest back up being LinkedIn, followed by Minds and Empire.Kred.
Besides this I am also armed with the knowledge and experience to build up my weaker accounts as well, since I have been studying, observing and experimenting the whole time with those platforms as well.
This also means if there is a new platform, I will probably be able to pick it up and do well if it is relevant.
This is all to point out, that it is more than just Twitter for me.
However if you would like to learn how I build up my Twitter and how it can apply to your social media game, keep a look out for the upcoming pre-orders which will be available for my upcoming book and course sold separately, Get 10,000 Real Followers/Month FREE On Twitter.
The book and course focuses on how you can grow your Twitter account using free techniques that are allowed by Twitter to grow your following in a targeted fashion towards your specific niche. It covers how to increase engagement, impressions and the best code of practice for social media, avoiding the common mistakes and and ineffective behaviour of certain accounts both famous and virtually unknown.
The best part is how I show you the manual way to do it, up to an hour a day or less to give yourself a platform for you to experiment for your message, your mission, your vision and your enterprise. Learn to build your world like me and you will have countless avenues for building massively valuable relationships with the right people.
The moment the pre-order goes on sale slated for winter, you’ll see it right here on Production Hackers.
Like what you see here? Express your support and follow @HonourableHappy on Twitter to stay updated on all the latest daily.
SPONSORED: 20% OFF PREMIUM WORDPRESS HOSTING THROUGH PRODUCTION HACKERS
Related Posts
Is “Expert Secrets” A Must-Have Marketing Book? Production Hackers Book Review Podcast Ep. #1 [Audio & Video]
New Video Playlist Release! “Production Hacker Numero Uno” Sharif S (aka Sparky the Sheriff) News
Production Hackers Digest Volume 1 PDF
Sharif Tweets! [#1] “Tweetin’ to Trump”
0 notes