-
Código fonte, apesar de fuzzy, não trás risco. Passou no Lint, e pela minha análise não possui pontes para memory leak interna.
-
Smelly Controller API. Porém, a sua API parte do princípio que as controllers são uma Closure JavaScript ( function ). Isso tráz consigo alguns riscos:
- Fere a orientação a objeto, oferencendo um modelo contextual ( baseado em Closure Stack ) para definir o escopo, diminuindo o reaproveitamento dos comportamentos das Views.
- Quando se tem mais de um nó DOM para se manipular, uma prática muito comum é computar o nó pai mais próximo do nós em questão. Assim, a busca fica condicionada a um escopo menor, oferencendo melhor performance na interação da tela à hardwares mais fracos. Usando uma Closure somos obrigados a guardar o estado em váriaveis globais ou na variavel escopo. Se salvo na variavel de escopo, deve-se ater a possíveis conflitos com nomes que possa ficar exposto, podendo trazer efeitos colaterais no comportamento da tela.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package user; | |
| import static layr.api.ResponseBuilder.renderTemplate; | |
| import layr.api.GET; | |
| import layr.api.PathParameter; | |
| import layr.api.Response; | |
| import layr.api.WebResource; | |
| @WebResource("user") | |
| public class UserWebResource { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define( function() { | |
| function isValidElement(element) { | |
| var nodeName = element[0].nodeName.toUpperCase(), invalidInputTypes = [ "BUTTON", "SUBMIT", "CLEAR" ] | |
| var result = ((nodeName != "BUTTON") && !(nodeName == "INPUT" && (invalidInputTypes.contains( element.attr( | |
| "type" ).toUpperCase() )))) | |
| return result | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DateConverter extends Converter<Date> { | |
| @Override | |
| public Date convert( String value, Class<Date> clazz ) throws ConversionException { | |
| Date convertedDate = tryToConvertFromLong( value ); | |
| if ( convertedDate == null ) | |
| convertedDate = tryToConvertFromInternationDateFormat( value ); | |
| if ( convertedDate == null ) | |
| throwCantConvertValueToDate( value ); | |
| return convertedDate; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head></head> | |
| <body style="background: #343434; color: white;"> | |
| <div class="logo" style="font-family: 'Exo'; font-size: 9em; padding: 0px; text-align: center;"> | |
| <span class="texo">texo</span><span class="it" style="color: #ff3f3f;">it</span> | |
| </div> | |
| <small style="text-align: center; display: block; font-family: 'Exo'; border-top: 2px solid; width: 40%; margin: 0 auto; font-size: 1.4em; position: relative; top: -72px; background: inherit; | |
| ">Professional OpenSource Software Development</small> | |
| </body> | |
| </html> |
Every time a WAR is deployed with uakka-servlet as dependency, an ActorSystem is created named with the WAR name.
Every time a message is consumed, HandleActor superclass will try to find a method named "handle" that accepts as parameter the same object type as the arrived message.
Every time an Actor is deployed with @Service annotation it will be auto-created in the WAR auto-created actor system.
Enterprise Beans vs Actors - some considerations:
- Services are singletons, mostly
- Every operation is performed asynchronously, with the implied hope that by the time someone asks for the result, the underlying operation will have finished.
- Spring operation methods' become message classes in Akka actor model read more...
Great spirits have always encountered violent opposition from mediocre minds.
Albert Einstein
When you play, play hard; when you work, don't play at all
Theodore Roosevelt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## StackOverFlow when deploying a EclipseLink application | |
| 14:24:28,738 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.4.Final | |
| 14:24:28,947 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.0.Beta2 | |
| 14:24:28,994 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.0.0.Alpha3 "WildFly" starting | |
| 14:24:30,010 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found cribble-web.war in deployment directory. To trigger deployment create a file called cribble-web.war.dodeploy | |
| 14:24:30,026 INFO [org.xnio] (MSC service thread 1-7) XNIO Version 3.1.0.CR3 | |
| 14:24:30,028 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http) | |
| 14:24:30,030 INFO [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.1.0.CR3 | |
| 14:24:30,038 INFO [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 4.0.0.Beta1 |