Showing posts with label api. Show all posts
Showing posts with label api. Show all posts

This small suite of sample web applications is offered to you as a way to illustrate use of the Twitter API, the collection of web service methods that bring Twitter data into third-party programming. These applications explore some common reasons to access the API:
Administration Tool
A master account is needed to do things like send direct messages and conduct data mining on the backend. Unlike most of the user-driven tools, the master account must be available even when the account holder (you) isn’t around to log in. This simple tool allows the master account’s password to be saved to the database in a safe way. Only you will use this tool. In fact, without knowing the password attached to the master Twitter account, others shouldn’t be able to do anything with this application.
Tweet Publisher
This application is a straightforward status updater. To publish to your own timeline, enter your Twitter account information and a short 140-character message. After doing so, you will see a link to the new tweet.
Auto Tweet
Each member account can be associated with a single RSS or Atom feed, from which a new tweet will be automatically generated. There is an automated task associated with this application that checks each registered feed for new content in six-hour cycles and posts the most recent article.
Tweet Broadcast
This is an aggregation tool, where you can collect daily tweets from a handful of other Twitter members into a single RSS item. An RSS feed is generated that contains information for up to 20 days of activity, collected by an automated task that checks for new tweets once a day. Each member account can have one aggregation feed.
Tweet Alert
Tracking tweets based on keywords is made easy with the Twitter search API. Each member can list a few keywords in Tweet Alert and receive a notification when any of those terms appears in a public tweet. The content scans are performed every 15 minutes. If a match is found—and the member is following your master Twitter account—a direct message is sent to that member with a link to the search results.
Network Viewer
Probably the most useful among the suite of tools, this web application allows Twitter members to see the profile images of all the people they’re following. Private accounts are outlined in red, and (in most modern browsers) mousing over each picture reveals additional detail about that member.

Product Description
This groundbreaking book provides you with the skills and resources necessary to build web applications for Twitter. Perfect for new and casual programmers intrigued by the world of microblogging, Twitter API: Up and Running carefully explains how each part of Twitter's API works, with detailed examples that show you how to assemble those building blocks into practical and fun web applications. You'll also get a complete look at Twitter culture and learn how it has inspired programmers to build hundreds of tools and applications. With this book, you will:

  • Explore every component of a Twitter application and learn how the API responds
  • Get the PHP and MySQL code necessary to build your own applications, with explanations of how these ingredients work
  • Learn from real-world Twitter applications created just for this book
  • Discover the most interesting and useful Twitter programs--and get ideas for creating your own--with the book's Twitter application directory.

Read More
Posted by JavaBooks on Thursday, July 23, 2009
0 comments
categories: , , , | edit post

A brief overview about MockEJB. You can Download MockEJB Here!

What is MockEJB?

MockEJB is a lightweight framework for running EJBs. MockEJB implements javax.ejb APIs and creates Home and EJBObject implementation classes for your EJBs. Internally, MockEJB relies on dynamic proxies and interceptors. MockEJB has two primary usages: 

  • It allows for running EJBs outside of the container for unit testing.You can run EJBs directly from your favorite IDE with the minimal setup effort. 
  • It allows for deploying mock EJBs (i.e., mock EJB implementation classes) into the container. Mock EJBs provide very effective way of isolating EJBs under test from the rest of the application. Mock EJBs return predefined test data and can override the actual "non-mock" deployed EJBs. Once again, the purpose of MockEJB is twofold and it works inside and outside of the container. So you can benefit from it even if you continue running all your test classes inside the container using Cactus. 

Additionally, MockEJB comes with the "mock" implementation of non-EJB APIs. Currently it provides in-memory JNDI and JMS implementations which can be used independently from MockEJB's EJB support. MockEJB is not a full-blown EJB container. It does not fully implement J2EE/EJB specs, however it supports all vital APIs. 

What are the advantages of running EJBs outside of the container?

Deploying EJBs into a container oftentimes becomes a complex operation requiring to run custom scripts and proprietary deployment tools. On the other hand, EJBs are the key components of J2EE applications and usually expose important application APIs/interfaces that must be properly tested. So it is desirable to be able to edit/compile/run EJBs directly from IDE and avoid costly redeployments into the container. This is especially true if you follow test-driven development practice in which case quick edit/compile/run cycle is a must. Therefore, the main advantage of testing outside of the container is the improved developers productivity and the quality of the tests. 

How MockEJB is better than instantiating and invoking a bean (Impl) class directly?

MockEJB allows you to test EJBs that: 

  • Rely on JNDI. 
  • Call other EJBs. 
  • Have logic in ejbCreate/ejbRemove methods. 
  • Use EJBMetaData, SessionContext and other javax.ejb APIs. 
  • Need container-managed transaction support. 
  • Rely on container's CMP services. 

What are the advantages of using mock EJBs?

J2EE applications usually are pretty complex, they consist of multiple layers and modules. This means that any given EJB may depend on a number of other EJBs. So, to be able to test an EJB efficiently, one needs a strategy of isolating the EJB under test from the rest of the application by minimizing its dependencies on other parts of the application that are not in scope of the test. 

MockEJB framework gives you the ability to replace these out of scope EJBs with the classes returning data suitable for your test. Therefore, the changes in the other parts of the application won't affect the functionality of your test. 

MockEJB framework creates mock EJBs in such a way that they only exist for the duration of the test. In other words, mock EJBs don't affect the actual "non-mock" EJBs already deployed in the container. 

Mock EJBs also allow you to write tests for non-EJB classes that have dependencies on EJBs (e.g., Struts action classes). You can run these tests with or without the container. Isn't EJB technology complex? How can it be implemented by a lightweight framework? EJBs are simple if you just want to run them for the purpose of testing your business logic. In this case, the support for numerous features defined by EJB spec is not really needed. You probably don't care too much about instance pooling, proper EJB lifecycle and clustering support when you just want to run your test and see if it passed. This is the key design principle of MockEJB. It only focuses on what's relevant for unit testing and it leaves true enterprise-strength EJB support to the J2EE application server vendors. 

What EJB capabilities are currently supported?

  • Stateless and stateful session beans. 
  • Local and remote interfaces. 
  • Message-driven beans with the ability to deploy to mock JMS destinations. 
  • EJBMetaData. 
  • EJBContext. 
  • Container-managed transactions. 
  • Exception handling. 
  • CMP and BMP entity beans (with some limitations).
  • Security (with limitations). 

What EJB capabilities are not currently supported ?

  • Some methods on EJBObject/EJBLocalObject. 
  • SessionSynchronization interface. 
  • Handles. 

While only a subset of EJB spec is supported, you can always extend MockEJB using interceptors.

Read More
Posted by JavaBooks on Wednesday, July 22, 2009

The EasyMock project provides a library that simplifies the use of Mock Objects in interfaces. Unit testing is the testing of software units in isolation. However, most units in real world production environments do not work alone, but rather in collaboration with other units. To test a unit in isolation, we have to simulate the collaborators in the test. A Mock Object is a test-oriented replacement for a collaborator configured to simulate the object it replaces. In contrast to a stub, a Mock Object can also verify whether it has been used as expected.

EasyMock was the first dynamic Mock Object generator, relieving the need for users to hand-write Mock Objects, or generate code for them.

EasyMock generates Mock Objects on the fly using Java's proxy mechanism. Due to EasyMock's unique style of recording expectations, most refactorings will not affect the Mock Objects. This makes EasyMock a perfect fit for Test-Driven Development.

You can download EasyMock Here!

Read More
Posted by JavaBooks on Tuesday, July 21, 2009

Apache ActiveMQ is the most popular and powerful open source Enterprise Messaging and Integration Patterns provider.

Apache ActiveMQ is fast, supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License

Grab yourself a Download, try our Getting Started Guide, surf our FAQ or start Contributing and join us on our Discussion Forums.

Features:

  • Supports a variety of Cross Language Clients and Protocols from Java, C, C++, C#, Ruby, Perl, Python, PHP
    • OpenWire for high performance clients in Java, C, C++, C#
    • Stomp support so that clients can be written easily in C, Ruby, Perl, Python, PHP, ActionScript/Flash, Smalltalk to talk to ActiveMQ as well as any other popular Message Broker
  • full support for the Enterprise Integration Patterns both in the JMS client and the Message Broker
  • Supports many advanced features such as Message Groups, Virtual Destinations, Wildcards and Composite Destinations
  • Fully supports JMS 1.1 and J2EE 1.4 with support for transient, persistent, transactional and XA messaging
  • Spring Support so that ActiveMQ can be easily embedded into Spring applications and configured using Spring's XML configuration mechanism
  • Tested inside popular J2EE servers such as Geronimo, JBoss 4, GlassFish and WebLogic
    • Includes JCA 1.5 resource adaptors for inbound & outbound messaging so that ActiveMQ should auto-deploy in any J2EE 1.4 compliant server
  • Supports pluggable transport protocols such as in-VM, TCP, SSL, NIO, UDP, multicast, JGroups and JXTA transports
  • Supports very fast persistence using JDBC along with a high performance journal
  • Designed for high performance clustering, client-server, peer based communication
  • REST API to provide technology agnostic and language neutral web based API to messaging
  • Ajax to support web streaming support to web browsers using pure DHTML, allowing web browsers to be part of the messaging fabric
  • CXF and Axis Support so that ActiveMQ can be easily dropped into either of these web service stacks to provide reliable messaging
  • Can be used as an in memory JMS provider, ideal for unit testing JMS

Read More
Posted by JavaBooks on

Visits

Label Cloud

About Me

Followers