Zend certified PHP/Magento developer

Create and assign block in controller magento 2

Thing I want to implemet is quite simple to imagine.
I need to create block inside controller, block without any predefined layout handles and templates. Just dynamically created block inside controller.

Here’s example from magento 1, only issue, here’s defined template, but its exact that I dont need:
link

$this->loadLayout();

$block = $this->getLayout()->createBlock(
    'Mage_Core_Block_Template',
    'my_block_name_here',
    array('template' => 'activecodeline/developer.phtml')
);

$this->getLayout()->getBlock('content')->append($block);

$this->renderLayout();

Is it possible to replicate the same with magento 2, but without any predifined templates. All things(block, template, or block wo template) should be created dynamically?