The HttpClient is library which is support by apache. It can post or get data from specific webservice and represents only the most basic contract for HTTP request execution.
We explain how to use this library with a example. In this example, we are going to use it to access the google tranlated API. Translating some text from specific language to other language. And this example using the Spring framework and Maven tool to build.
As we know, it’s very difficult to make the IDE to recognise the function of JavaScript, we called code intellisense, because JavaScript is weak language. So how to solve this problem. There is a way.
TSD is TypeScript Definition manager for DefinitelyTyped. It can search and install TypeScript definition files directly from repository. The TypeScript definition file actually is TypeScript file, and TypeScript is strong type language. So IDE can intellisense the code, like Java and C#.
TypeScipt is also like CoffeeScript, it can be compiled to JavaScript. It is developed by Microsoft company. To See the TypeScript, go to this official website.
As we know, if we want to submit data in the form, we just need to create a input or button element in the form and give them the submit value to the type attribute. Or using javascript to call form.submit().
But there is third way to submit form. That’s the implicit submission of form when pressing the enter key under some situations. The form implicit subbmission supported by all browsers, and html spec strongly recommand do this.
In this article, we introduce how to use AOP with the @AspectJ Annotation. If we want to use this Annotation. we should include below code in the XML schema-based configuration file.
1 | <aop:aspectj-autoproxy/> |
And also you need to add these libraries to your project, aspectjrt.jar, aspectjweaver.jar, aspectj.jar and aopalliance.jar.
Previously, we created AOP with Spring framework via implementing interface of spring AOP. And now we can use XML Schema to achieve it. We need to add below AspectJ libraries to our project. So downloading and adding them to the CLASSPATH of application, and also we can use the maven to build our application.
- aspectjrt.jar
- aspectjweaver.jar
- aopalliance.jar
If we want to intercept methods with dynamic pointcut, we need to override matches and getClassFilter methods of DynamicMethodMatcher abstract class. The dynamic pointcut can verify the arguments of the method at runtime. This is a difference with static pointcut.
Let’s first to see the three very technical terms as below.
- Adivce - Indicate the action to take either before or after the method execution.
- Pointcut - Indicate which method should be intercept, by method name or regular expression pattern.
- Advisor - Group ‘Advice’ and ‘Pointcut’ into a single unit, and pass it to a proxy factory object
**Ruby**是一门脚本语言,由日本人松本行弘发明,旨在让开发人员用更简洁的方式快乐的编程。他的语法类似Python脚本语言,比较优雅,而且还提供了一些丰富强大的类库。Ruby的意思是**红宝石**.