As always, it depends. But in this case I wouldn't be surprised if many applications build one or the other based on technical considerations.
A sliding mechanism like you propose only works if you have enough screen size in width. If most of your users use smaller screens the mechanism would not work that well because it simply doesn't fit. This would mean that for smaller screens you'd probably need an alternative to the sliding panel. Most of the time in the form of opening the sliding panel on a new page to keep the focus on data entry. This adds to development time, for a mechanism which is only of use on wide-screen displays.
From a UX perspective I would take several things into considerations:
- Also screen sizes. You want to cater to the screens your users use. Sliding panels are applicable on wider screens
- Number of elements. If a new entity requires a large amount of information to be created, possibly not fitting the length of the screen, opening a new page would be favorable to overcome cramping too much into a small space
- Focus. Will it harm the user to open a new page? A separate page brings focus to the task at hand, while a sliding panel will make a page cluttered.
- Speed. a sliding panel should speed up adding a new item. If this is required, it would provide a case for sliding panels.
Overall try and figure out whether it will help the user, or whether it is just a cool feature. A sliding panel sounds awesome, and will look good in pictures. But if it goes against the points mentioned above I would advise against.
My own opinion
The space you want to use for adding an item is IMO more often used for detailed information of an object you select in the table, rather than adding a new item. This follows the reading pattern of most western countries,where people are used to start on the (top)left, and changing their gaze to the (bottom) right. Left most important info, right least important or last in succession.
- Email clients have folders left, list of email in middle, and opened mail on right. (creating new email often in a new window)
- Finder/Windows directories: left are the folders, middle the files, right detailed information.
- Stackexchange features secondary lists and items on the right.
Important/primary tasks are often done in the center of your screen, leaning to the left. Not on the far right.
You are missing the option of a lightbox/modal/overlay for quick addition of a new entitiy. This is quick, and much easier to apply on multiple screens. On mobile a modal would simply be shown as a full page.
Hope this helps you a bit.