• 0

Java event framework similar to C# events


Question

TechAddict

Hello java developers,

 

I am primarily a java developer but I've recently done some C# work and one thing that i really liked was how C# makes event driven programming so easy. So, when I came back to Java, it was a feature that i really missed. Of course, event driven programming is not impossible to do in Java, but it requires you to write addListener, removeListener, keep a list of observers etc in each class. You an also make your of Observable interface but it just does not offers the same flexibility as C# events.

 

I've searched for good libraries that offers similar functionality, but most of then were mainly annotation driven or hard to use or too complicated. So decided to write a framework myself. After spending some considerable amount of time researching and trying out different methods, I've finished a java library that tries to mimic C# events while keeping the code very minimal. And I though I might make the library available to anyone interested in this small project or those who have been looking for a good event driven framework.

 

The project is called "JEvents" (yeah,i know, a lame name) and is available here -> http://chanthus.github.io/JEvents/

 

Hope you find it useful. Feel free to point out any mistakes or give any suggestions.

  • Like 3
Link to post
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By News Staff
      Price Dropped: The Complete Mobile & App Development Bundle now just $20
      by Steven Parker



      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save $1,771 off the Mobile App Developers Bundle. Program, design and build amazing apps for both Android and iOS with 71 hours of content on Java, React Native, Git, and more.

      This deal consists of the following courses:

      iOS 14 & Swift 5: The Complete iOS App Development Course
      Learn Everything About iOS & Swift and Create Your Own Apps from Scratch Android Development Course: Learn Android 11 from Scratch
      Learn to Build & Publish 2 Major Apps with Step-by-Step Demonstrations Android Development: Android App Development Course with Pie
      Learn Fragment, Architectural Room & Firebase and Become an Android Expert Android Development 2021 Practice Guide: Real World Apps
      Build 10 Different Android Apps with Hands-On Development Content Java Programming: Learn Core Java & Improve Java Skills
      Hands-On Examples & Lessons That Will Take You from Beginner to Expert on Java React Native & Router: Build Mobile Apps with React and Expo
      Create Your Own Mobile App Both with React-Native-Cli & Expo-Cli React Native: Learn React Native with Hands-On Practices
      Dive Deeper Into React Native & Use It to Build iOS and Android Apps Complete Git & Github Beginner to Expert
      Comprehensive Approach to Git & Github with No Prior Knowledge Required Mobile App Development with Flutter & Dart
      Be Able to Build Any Android or iOS App You Want Based on Flutter & Dart Here's the deal:
      This Complete Mobile & App Development Bundle normally costs $1,791, but you can pick it up for just $20 for a limited time - that represents a saving of $1,771 (99%) off. For a full description, specs, and instructor info, click the link below.

      Get this deal, or learn more about it
      Not for you?
      That's OK, there are other deals on offer you can check out here.

      Ivacy VPN - 5 year subscription for just $1 per month NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 71% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Neowin Store for our preferred partners. Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Giveaways: Polycade Home Arcade | $5K in cash | $10K in Crypto | Gaming Bundle Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.

    • By Usama Jawad96
      Microsoft, Accenture, and GitHub team up to announce the Green Software Foundation
      by Usama Jawad

      Apart from developer-oriented announcements focused on the technical implementation of new services and features, Microsoft also revealed that it is partnering with various organizations to form the Green Software Foundation.



      Microsoft is joining hands with numerous companies including Accenture, GitHub, ThoughtWorks, and Goldman Sachs, among others as a part of this effort. The non-profit is also affiliated with the Linux Foundation. The aim of the endeavor is to develop a sustainable ecosystem powering apps that produce less carbon. The Green Software Foundation aims to reduce carbon emissions of software by 45% by 2030.

      On its dedicated webpage, the Foundation says that:

      Key focus areas for the Green Software Foundation include setting best standards, supporting academic research, facilitating open source projects, and growing an international and diverse community of members who are proponents of green software engineering.

      As of right now, membership is open for non-profit and for-profit organizations and those interested in procuring it can sign up here.

    • By Usama Jawad96
      Microsoft's Build of OpenJDK is now generally available
      by Usama Jawad

      Microsoft's annual build conference is always an exciting event, especially for developers utilizing the company's services, such as Azure. As usual, the Redmond tech giant's cloud platform has headlined most announcements.



      Starting with customers who want to run their Java Enterprise Editions (EE) workloads in the cloud, the Azure Marketplace has two new offerings. Customers running Java apps on JBoss EAP can migrate to Azure Red Hat Enterprise Linux (RHEL) virtual machines. Similarly, customers utilizing WebSphere can also transition to virtual machines on Azure.

      That's not all for customers using Java. Microsoft's Build of OpenJDK, which hit preview on April 6, is now generally available. For those unaware, this is a long-term support (LTS) distribution of OpenJDK based on the Java SE Platform. The company recommends it as a Microsoft-supported option for Azure customers and says that it includes binaries for Java 11 based on OpenJDK 11.0.11, across various environments like x64 server, macOS, Linux and Windows.

      Additionally, Durable Functions are now generally available and will let developers write serverless workflows in PowerShell. Built-in HTTP endpoints are also present for monitoring purposes. Logic Apps have been updated with new cost-effective hosting options, improved performance and integration with developer tools like Visual Studio Code.

      In the same vein, Azure app services can now run on Kubernetes clusters via Azure Arc. This capability is currently available in preview. For users of Azure API Management, native support for WebSocket APIs is in preview, allowing a consolidated view for observation and management.

      Finally, loads of enhancements are coming to Azure Communication Services, all in preview. As of now, a UI library contains Fluent UI components. The Traversal Using Relays around NAT (TURN) protocol can be utilized in communication components built using Communication Services. Meanwhile, the Calling SDK has been made available for the Universal Windows Platform (UWP) through which developers can build communication experiences across Windows 10, Xbox, and more. Call recording is coming to Azure Communication Services next month and so is direct routing, which builds a virtual connection between an app and legacy telephony systems.

    • By zikalify
      GitHub introduces video uploading across its platform
      by Paul Hill



      GitHub has announced that it’s now possible for users to upload videos across its platform. MP4 and MOV files can be uploaded in issues, pull requests, discussions, and more. The inclusion of this feature will open up new possibilities including clearer demonstrations of new features or bugs in software projects.

      The firm previously released video uploads as a beta feature back in December but now it’s considered stable enough for everybody on the platform to use. Now that it’s available, all users can upload videos to help maintainers reproduce bugs, provide context on pull requests for reviewers, give a demonstration of new features currently in the prototype phase, and more.

      Commenting on the ability to upload videos, Lauren Brose from GitHub said:

      The ability to upload videos is also arriving with mobile support. Both the iOS and Android GitHub mobile apps are capable of uploading videos to the platform but you’ll need to update the apps to their latest versions.

    • By News Staff
      Save 94% off a lifetime membership to Whizlabs Online Certifications
      by Steven Parker



      Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can save 94% off a lifetime membership to Whizlabs Online Certifications. Get lifetime access to affordable world-class certification training courses and gain new, essential industry skills.

      Are you a practicing professional but wanting to learn more? Learn new skills and knowledge at your own pace with Whizlabs. Whizlabs is a pioneer among online training providers across the world. They provide online certification training in various disciplines such as Cloud Computing, Java, Big Data, Project Management, Agile, Linux, CCNA, and Digital Marketing. Launched in 2000, Whizlabs has helped more than 3 million professionals and 100+ companies across the world to succeed in their careers with multitudes of courses. If you want to boost your career or grow in your current field, then sign up to Whizlabs now!

      Access various courses on AWS, Microsoft, Google Cloud, Java, Linux & more Get certifications & validate and demonstrate your new skills Learn from subject-matter experts & certified professionals Get regularly updated content What's the benefit?
      Lifetime membership to Whizlabs Online Certifications normally costs $4,499, but you can pick it up for just $239.99 for a limited time - that represents a saving of $4,259.01 (94%) off. For a full description, specs, and instructor info, click the link below.

      Save 94% off a lifetime membership to Whizlabs
      Not for you?
      That's OK, there are other deals on offer you can check out here.



      Enter giveaways: Polycade Home Arcade | $5K in cash | $10K in Crypto Ivacy VPN - 5 year subscription for just $1 per month NordVPN - 2 year subscription at up to 68% off Private Internet Access VPN - subscriptions at up to 71% off Unlocator VPN or SmartDNS - unblock Geoblock with 7-day free trial Neowin Store for our preferred partners. Subscribe to Neowin - for $14 a year, or $28 a year for Ad-Free experience Disable Sponsored posts · Neowin Deals · Free eBooks · Neowin Store

      Disclosure: This is a StackCommerce deal or giveaway in partnership with Neowin; an account at StackCommerce is required to participate in any deals or giveaways. For a full description of StackCommerce's privacy guidelines, go here. Neowin benefits from shared revenue of each sale made through our branded deals site, and it all goes toward the running costs.