Comments (16)
I agree! 👍
from prism.
Sure. Out with the old and in with the new!
from prism.
Moving the namespace from Microsoft.Practices.Prism.PubSubEvents to Prism.Events certainly aligns it with the rest of (the new) Prism. That's a clear choice I'd say.
Changing the class name from PubSubEvent to PrismEvent is (in my opinion) a harder nut to crack. It would fit more in the branding of the Prism product. On the other hand the PubSubEvent class hints we're using a publisher-subscriber pattern, which is also clearly stated by the Publish and Subscribe methods. But then you could bring up as argument that nobody will use Prism without reading at least some documentation (which would state the publisher-subscriber pattern).
from prism.
I'm kind of torn on this. On one hand I personally don't like the name PubSubEvent
but on the other hand I don't like the idea of tying it up too much with Prism. Prism is too close to be a pure Windows+WPF only library. Unless we plan to make Prism a true cross platform library, I don't want to give an impression that this awesome library has anything to do with Windows+WPF. As a matter of fact, we are using PubSubEvents
package in our Xamarin.Mac apps.
from prism.
If you look at the new structure, Prism is now headed towards a true cross platform library. Commanding, Logging, and Even Aggregation (PubSubEvents) have moved into a single PCL. We also recently started adding support for Xamarin.Forms. Soon we will be adding Windows 10 support.
from prism.
I noticed that and if that's where we are heading then I'm all up for it. Let's do it! I like the name way better then PubSubEvent anyway.
from prism.
It would be great 👍
from prism.
👍
from prism.
Anything other than PubSubEvent would be an improvement in my book. I like PrismEvent from a branding perspective. Although, personally, I would try to get away with just Event<>, if possible (since Prism is already in the namespace), but PrismEvent is better than the previous version. Prism is just a cool/good name. 👍
from prism.
I would vote against this. Including the brand name in the class name does not make it more clear what the class does and since the class is already included in a branded name space it does not convey any extra information. I would not be against changing the name, but as bartlannoeye already said the name covers the class's functionality pretty good.
Extreme example, I don't think anybody thinks its a good idea to add "Prism" in front of all classes in the prism library. So why is it a good idea to add it in front of one class?
/me is not looking forward to typing
var nav = new PrismRegionNavigationSerivce(new PrismServiceLocator(), new PrismRegionNavigationContentLoader(), new PrismRegionNavigationJournal());
from prism.
Well technically, the class doesn't really do anything special. PubSubEvent is not the concern that is doing the publishing or subscribing. The IEventAggregator is doing the pub/sub action. So the PubSubEvent name doesn't fit well with the class. The PubSubEvent is just an event used by the IEventAggregator. The reason to prefix with "Prism" is to eliminate any collisions with any .NET Event class, since it is an event specifically for use in Prism with the event aggregator.
from prism.
EventAggregatorEvent?
from prism.
So I was looking into this some more and it appears that there is no Event class in .NET. There is an "event" keyword, but no Event class. So, what if we just called it Event?
public class SaveEvent : Event < string > { }
Thoughts?
from prism.
👍 👍 👍
from prism.
It's been brought up that Event < string > may be too ambigious, and I tend to agree.
And, it turns out that I was wrong when I said the IEventAggregator does the pub/sub action. It is actually the event. I don't know what I was thinking!
Anyways, knowing that the event does actually perform the pub/sub actions, should we just keep it PubSubEvent?
I am leaning towards keeping it that way.
from prism.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from prism.
Related Issues (20)
- [BUG] App crash with the attached sample project HOT 1
- [BUG] .NET 8 MAUI App crashes on startup HOT 2
- [BUG] Putting an app in background when a modal is being displayed crashes the App HOT 2
- [BUG] crash when resolve an object after async function in maui app HOT 3
- [BUG] System.ArgumentException: Page to remove must be contained on this Navigation Page HOT 4
- Tab Navigation working in iOS but not Android[BUG] HOT 7
- [BUG] Region is not working on Maui when Rider Debugger is attached HOT 7
- [BUG]DelegateCommand.ObservesProperty method does not function correctly HOT 1
- [BUG] [Regions] LayoutViewRegionAdapter should be mapped to Maui.Controls.Layout instead of Maui.Controls.Compatibility.Layout HOT 1
- [BUG] [Regions] [FlyoutPage] View discovery on FlyoutPage
- [Enhancement] [Regions] Add 'AddOrReplace' to IRegionBehaviorFactory HOT 3
- [BUG] In some cases, my Dedug will suddenly get stuck HOT 1
- [BUG] Popup Dialogs are hidden/covered by calling Page when called after returning from MAUI FilePicker HOT 4
- [BUG] Plugin.Popups.Maui on iOS navigate to new page when showing popup Page HOT 10
- [BUG] Absolute navigation not working on iOS HOT 3
- [BUG] Wiring view models for pages in tabbed page are done by name HOT 1
- [BUG] Popup Dialog can't fullscreen and also DialogLayout.CloseOnBackgroundTapped not working. HOT 4
- Add CloseDialog to IDialogService or Extension Method
- [BUG] Prism and MauiCompatibility are incompatibile on Windows HOT 5
- [BUG] Page.OnBackButtonPressed not called in MAUI Android HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prism.